WebSalary.WebUI.F_SalaryAnnalPrint的声明上缺少 partial 修饰符;存在此类型的其他分部声明

Louis-Lv 2011-05-12 03:17:59
vs03的代码 放到05里面 就出现了这样的错误。。 有谁知道为什么啊!!!


代码如下 :
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using WebSalary.Common;
using WebSalary.Common.Data;
using WebSalary.BussinessFacade;
using WebSalary.WebUI.report;
using WebUtils;
using System.Diagnostics;

namespace WebSalary.WebUI
{
/// <summary>
/// F_SalaryAnnalPrint 的摘要说明。
/// </summary>
public class F_SalaryAnnalPrint : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label Label3;
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.DropDownList DDL_AccountDate;
protected System.Web.UI.WebControls.Label Label4;
protected System.Web.UI.WebControls.DropDownList DDL_dept;
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.DropDownList DDL_section;
protected System.Web.UI.WebControls.Label Label7;
protected System.Web.UI.WebControls.DropDownList DDL_printer;
protected System.Web.UI.WebControls.Button BT_print;
protected System.Web.UI.WebControls.Button BT_preview;
protected System.Web.UI.WebControls.Label Label6;

public SectionData sections;
protected System.Web.UI.WebControls.Label Label5;
protected System.Web.UI.WebControls.TextBox TB_Pfrom;
protected System.Web.UI.WebControls.TextBox TB_Pto;
public DataSet depts;


private void Page_Load(object sender, System.EventArgs e)
{
if (!Page.IsPostBack)
{
getPrinter();

DDL_AccountDate.SelectedValue=Common.WebSalaryConfigurations.settleym.Substring(0,4);

filldata();

Page.DataBind();
}
this.Label6.Text="";
}

public void filldata()
{
DataRow dr;
depts=(new DataAccess.Sections()).LoadDept();
dr=depts.Tables[0].NewRow();
dr[0]="*";

depts.Tables[0].Rows.InsertAt(dr,0);
//
sections=(new DataAccess.Sections()).LoadSection();
dr=sections.Tables[0].NewRow();
dr[0]="*";

sections.Tables[0].Rows.InsertAt(dr,0);

}

public void getPrinter()
{


WebPrinters PrinterObj=(WebPrinters)Server.CreateObject("WebUtils.WebPrinters");
if (PrinterObj.PrinterCount!=0)
{
DDL_printer.Items.Add(new ListItem("默认打印机",""));
for (int i=0;i<=PrinterObj.PrinterCount;i++)
{
short j=Convert.ToInt16(i);
this.DDL_printer.Items.Add(new ListItem(PrinterObj.get_DeviceName(ref j),PrinterObj.get_DeviceName(ref j)));
}

}
}

#region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.BT_print.Click += new System.EventHandler(this.BT_print_Click);
this.BT_preview.Click += new System.EventHandler(this.BT_preview_Click);
this.Error += new System.EventHandler(this.F_SalaryAnnalPrint_Error);
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

private void BT_preview_Click(object sender, System.EventArgs e)
{
string strdept;
string strsection;
/////////////////////////////////////////////
if (DDL_dept.SelectedValue=="*")
{
strdept="";
}
else
{
strdept=DDL_dept.SelectedValue;
}
////////////////////////////////////////////////
if (DDL_section.SelectedValue=="*")
{
strsection="";
}
else
{
strsection=DDL_section.SelectedValue;
}
//20070202
(new DataAccess.Security()).WriteLog(Context.User.Identity.Name,"预览","工资年表",this.DDL_AccountDate.SelectedValue);
this.Label6.Text="<script>window.open('F_SalaryAnnalPreview.aspx?settleYM="+DDL_AccountDate.SelectedValue+"&dept="+ strdept+"§ions="+ strsection +"')</script>";
//this.Label6.Text="<script>Form1.TB_empname.focus()</script>";
}

private void BT_print_Click(object sender, System.EventArgs e)
{
//20070202
(new DataAccess.Security()).WriteLog(Context.User.Identity.Name,"打印","工资年表",this.DDL_AccountDate.SelectedValue);
CR_SalaryAnnal cr=new CR_SalaryAnnal();

string strdept;
string strsection;

/////////////////////////////////////////////
if (DDL_dept.SelectedItem.Text=="*")
{
strdept="%";
}
else
{
strdept=DDL_dept.SelectedValue;
}
////////////////////////////////////////////////
if (DDL_section.SelectedItem.Text=="*")
{
strsection="%";
}
else
{
strsection=DDL_section.SelectedValue;
}



AnnalDS ds=(new DataAccess.querys()).LoadSalaryAnnal(this.DDL_AccountDate.SelectedValue,strdept,strsection);

cr.SetDataSource(ds);
// 选择打印机。
cr.PrintOptions.PrinterName=DDL_printer.SelectedValue;
try
{
//cr.PrintToPrinter(1,false,0,0);
cr.PrintToPrinter(1,false,int.Parse(this.TB_Pfrom.Text),int.Parse(this.TB_Pto.Text));//20061215
}
catch
{
this.Label6.Text="<script>window.alert('打印机状态出错,请重新选择!')</script>";
}
}

private void F_SalaryAnnalPrint_Error(object sender, System.EventArgs e)
{
if (!EventLog.Exists("Application"))
{
EventLog.CreateEventSource("Application","Application");
}
EventLog log=new EventLog();
log.Source="Application";
Exception exp=Server.GetLastError();
string msg="F_SalaryAnnalPrint --> 源:"+exp.Source+" --> 信息:"+exp.Message+" --> 堆栈:"+exp.StackTrace;
log.WriteEntry(msg,EventLogEntryType.Error,1);
log.Close();
log.Dispose();
//Server.ClearError();
}
}
}
...全文
372 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
Louis-Lv 2011-08-05
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 god_girl 的回复:]
老火 我还是 遇到这个错了 我是 在 类里面遇到的
[/Quote]
在aspx。cs页面里面 加个partail就好了
public partial class _Default
  • 打赏
  • 举报
回复
老火 我还是 遇到这个错了 我是 在 类里面遇到的
Louis-Lv 2011-06-22
  • 打赏
  • 举报
回复
技术贴就这样的啊啊啊
来个人我结贴啊
Louis-Lv 2011-05-25
  • 打赏
  • 举报
回复
好吧。。 我个人问题。。 尽然不小心给忘了 不好意思不好意思
Louis-Lv 2011-05-23
  • 打赏
  • 举报
回复
悲剧啊。。 怎么都没人啊
YOLOv11人物目标检测数据集 目标类别:['Persona'] 中文类别:['人物'] 训练集:1683 张 验证集:182 张 测试集:0 张 总计:1865 张 该数据集提供了data.yaml文件,内容如下: train: ../train/images val: ../valid/images test: ../test/images nc: 1 names: ['Persona'] YOLOv11城市街头与室内场景人物目标检测数据集 该数据集涵盖了城市街头、商业街区、办公场所及室内生活等多种场景中的人物目标检测,具有广泛的应用价值。通过多样的场景设置和丰富的拍摄角度,能够有效提升模型在复杂环境下的目标识别能力,为智慧城市、安防监控及人机交互等领域提供高质量的训练数据支持。 从数据分布来看,该数据集包含1683张训练集图像、182张验证集图像以及0张测试集图像,整体比例分配合理。训练集与验证集的比例约为9.25:1,能够充分满足模型训练与性能评估的需求,确保模型在不同场景下的泛化能力得到充分验证。 该数据集的标注工作严谨规范,所有图像均经过人工精确标注,每个目标都配有清晰的边界框和统一的标签“Persona”。标注过程遵循严格的标准,确保了数据的高质量和一致性,为后续的模型训练和性能优化提供了可靠的基础。 基于其多样化的场景覆盖和高质量的标注数据,该数据集可广泛应用于智慧城市管理、公共场所安防监控、智能零售分析以及家庭安防等多个领域。特别是在需要精准识别复杂环境中人物的目标检测任务中,该数据集能够显著提升模型的准确性和鲁棒性。

111,129

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧