private void BindDataList() { //接收人单位 DataTable dtor = ordal.GetDataTable(""); //批准人单位 if (AccessDataSet.HasDataTable(dtor)) { this.txtApproverUnit.DataSource = dtor; this.txtApproverUnit.DataTextField = "OrganizerName"; this.txtApproverUnit.DataValueField = "OrganizerName"; this.txtApproverUnit.DataBind(); this.txtApproverUnit.Items.Insert(0, new ListItem("--请选择--", "")); } this.txtApproverUnit.SelectedValue = LoginUser.OrganizerName; this.txtTransferPeople.Text = LoginUser.GetUserName; this.txtApproverUnit.SelectedValue = LoginUser.CountyId; DataTable execDt = fedal.GetDataTableProcSUM(LoginUser.CountyId); if (AccessDataSet.HasDataTable(execDt)) { this.Xfxzxkda.Text = execDt.Rows[0]["消防行政许可档案"].ToStr(); this.Xfjdjcda.Text = execDt.Rows[0]["消防监督检查档案"].ToStr(); this.Xfaqzddwda.Text = execDt.Rows[0]["消防安全重点单位档案"].ToStr(); this.Zdhzyhda.Text = execDt.Rows[0]["重大火灾隐患档案"].ToStr(); this.Hzsgdcda.Text = execDt.Rows[0]["火灾事故调查档案"].ToStr(); this.Xfxzcfda.Text = execDt.Rows[0]["消防行政处罚档案"].ToStr(); this.Xfxzqzda.Text = execDt.Rows[0]["消防行政强制档案"].ToStr(); this.Xfzfjjda.Text = execDt.Rows[0]["消防执法救济档案"].ToStr(); this.Xfxsda.Text = execDt.Rows[0]["消防刑事档案"].ToStr(); } }
FileEnterDal fedal = new FileEnterDal(); //档案信息 protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { if (LoginUser.CountyId == "420100") { GetStyle = " style=\"display:block;\" "; } else { GetStyle = " style=\"display:none;\" "; } DataTable dtinfor = dal.GetUserDataTable(" and us.id=" + LoginUser.GetUserId + " "); //获取传递的参数,编辑时ID主键 if (AccessDataSet.HasDataTable(dtinfor)) { this.lbusername.Text = dtinfor.Rows[0]["userName"].ToString(); this.lblxdh.Text = dtinfor.Rows[0]["userTel"].ToString(); this.lbdzyx.Text = dtinfor.Rows[0]["userMail"].ToString(); this.lbzzjg.Text = dtinfor.Rows[0]["userPost"].ToString(); this.lbssdw.Text = dtinfor.Rows[0]["zzjg"].ToString(); LoadData(); BindDaSource(); } } }
protected void LoadData() { //执法档案库室 DataTable dtfl = fldal.GetDataTable(" and qxdm='" + LoginUser.CountyId + "'"); if (AccessDataSet.HasDataTable(dtfl)) { this.drop_FileLibraryName.DataSource = dtfl; this.drop_FileLibraryName.DataTextField = "FileLibraryName"; this.drop_FileLibraryName.DataValueField = "ID"; this.drop_FileLibraryName.DataBind(); //this.drop_FileLibraryName.Items.Insert(0, new ListItem("--请选择--", "")); } }
private void BindDataList() { //执法档案目录号 DataTable dtfile = Utility.GetFileClassTree(); if (AccessDataSet.HasDataTable(dtfile)) { this.txtFileClassID.Items.Clear(); this.txtFileClassID.Items.Insert(0, new ListItem("--请选择--", "")); foreach (DataRow dr in dtfile.Rows) { string Id = dr["ID"].ToStr(); string name = dr["FileName"].ToStr(); //增加数据集合 this.txtFileClassID.Items.Add(new ListItem(Utility.GetStr(dr["lv"].ToStr()) + name, Id)); if (this.GetRequestInt("ID") > 0) { this.txtFileClassID.Items.FindByValue(Id).Selected = true; } } } //批准人单位 DataTable dtor2 = ordal.GetDataTable(""); if (AccessDataSet.HasDataTable(dtor2)) { this.txtApproverUnit.DataSource = dtor2; this.txtApproverUnit.DataTextField = "OrganizerName"; this.txtApproverUnit.DataValueField = "OrganizerName"; this.txtApproverUnit.DataBind(); this.txtApproverUnit.Items.Insert(0, new ListItem("--请选择--", "")); } //监督人单位 DataTable dtor = ordal.GetDataTable(""); if (AccessDataSet.HasDataTable(dtor)) { this.txtSuperviseUnit.DataSource = dtor; this.txtSuperviseUnit.DataTextField = "OrganizerName"; this.txtSuperviseUnit.DataValueField = "OrganizerName"; this.txtSuperviseUnit.DataBind(); this.txtSuperviseUnit.Items.Insert(0, new ListItem("--请选择--", "")); } this.txtSuperviseUnit.SelectedValue = LoginUser.OrganizerName; //this.txtApproverPeople.Text = LoginUser.GetUserName; this.txtDestroyPeople.Text = LoginUser.GetUserName; }
protected string sjmc(string id) { String strreturn = String.Empty; DataTable dt = dal.GetDataTable(" and ID=" + id + ""); if (AccessDataSet.HasDataTable(dt)) { strreturn = dt.Rows[0]["FileName"].ToString(); } else { strreturn = ""; } return(strreturn); }
//批量接收 protected void btnCheckSave_Click(object sender, EventArgs e) { string ids = "0"; for (int i = 0; i < rptList.Items.Count; i++) { int id = ((Label)rptList.Items[i].FindControl("lb_id")).Text.ToInt32(); CheckBox cb = (CheckBox)rptList.Items[i].FindControl("cb_id"); if (cb.Checked) { ids += "," + id; } } DataTable dttf = daltf.GetDataTable(" and id in (" + ids + ") "); ArrayList alsql = new ArrayList(); Boolean flag = false; if (AccessDataSet.HasDataTable(dttf)) { foreach (DataRow item in dttf.Rows) { string sqlStr = ""; //接收移交记录 sqlStr = " update FileTransfer set sjzt=2,Jssj='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',AcceptPeople='" + LoginUser.GetUserName + "',AcceptUnit='" + LoginUser.OrganizerName + "' where id='" + item["id"] + "' "; alsql.Add(sqlStr); string strupdate = ""; //接收更新档案状态 DataRow drdg = fedal.GetRow(item["FileEnterID"]); if (drdg != null) { strupdate = " update FileEnter set ReceiptTime='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',oldEnteCountyId='" + drdg["EnteCountyId"] + "',oldEnteUserName='******',EnteCountyId='" + LoginUser.CountyId + "',EnteUserName='******',EnforcementID_new='" + LoginUser.OrganizerId + "',EnforcementName_new='" + LoginUser.OrganizerName + "',FileLibraryID_old='" + drdg["FileLibraryID"] + "',FileLibraryName_old='" + drdg["FileLibraryName"] + "',FileLibraryID='',FileLibraryName='',FileTransferSJLX=1,FileTransferID='" + item["id"] + "' where id='" + item["FileEnterID"] + "' "; } alsql.Add(strupdate); } flag = TSQLServer.execTriggerAll(alsql); } if (flag == true) { new MessageBox(Page).ShowAndJump("批量移交支队成功!", "Manage_Center.aspx"); //操作日志 LogListDal.Insert(DateTime.Now, "案卷档案[" + ids + "]批量移交支队", LoginUser.GetUserId, LoginUser.GetUserName); } else { new MessageBox(Page).ShowAndJump("批量移交支队失败!", "Manage_Center.aspx"); } this.BindDaSource(); }
//批量移交支队 protected void lbtnFileTransfer_Click(object sender, EventArgs e) { string ids = "0"; for (int i = 0; i < rptyjzdList.Items.Count; i++) { int id = ((Label)rptyjzdList.Items[i].FindControl("lb_id")).Text.ToInt32(); CheckBox cb = (CheckBox)rptyjzdList.Items[i].FindControl("cb_id"); if (cb.Checked) { ids += "," + id; } } DataTable dttf = dal.GetDataTableyjzd(" and id in (" + ids + ") "); ArrayList alsql = new ArrayList(); Boolean flag = false; if (AccessDataSet.HasDataTable(dttf)) { foreach (DataRow item in dttf.Rows) { string sqlStr = ""; //添加移交记录 sqlStr = " insert into FileTransfer(FileEnterID,FileClassID,FileClassName,FileEnterName,TransferPeople,TransferUnit,AcceptSzqxdm,TransferDate,OperateTime,Remark,UserID,Username,sjzt,SZQXDM,Yjlx) values ('" + item["id"].ToString() + "','" + item["FileClassID"].ToString() + "','" + item["FName"].ToString() + "','" + item["FilesName"].ToString() + "','" + LoginUser.GetUserName + "','" + LoginUser.OrganizerName + "','420100','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','','" + LoginUser.GetUserId + "','" + LoginUser.GetUserName + "',0,'" + LoginUser.CountyId + "',1) "; alsql.Add(sqlStr); string strupdate = ""; //更新移交时间 strupdate = " update FileEnter set FileTransferDate='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',sjlx=3 where id='" + item["id"].ToString() + "' "; alsql.Add(strupdate); } flag = TSQLServer.execTriggerAll(alsql); } if (flag == true) { new MessageBox(Page).ShowAndJump("批量移交支队成功!", "FileTransferyjzd.aspx"); //操作日志 LogListDal.Insert(DateTime.Now, "案卷档案[" + ids + "]批量移交支队", LoginUser.GetUserId, LoginUser.GetUserName); } else { new MessageBox(Page).ShowAndJump("批量移交支队失败!", "FileTransferyjzd.aspx"); } this.BindDaSource(); }
/// <summary> /// 保存操作 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSave_Click(object sender, EventArgs e) { //获取界面数值赋值给model对象 int FileClassID = this.GetRequestInt("txtFileClassID"); string FileClassName = this.txtFileClassID.SelectedItem.Text.Trim('-'); string FileEnterName = this.GetRequestStr("txtFileEnterName"); string BorrowPeople = this.GetRequestStr("txtBorrowPeople"); string BorrowUnit = this.GetRequestStr("txtBorrowUnit"); string ApproverPeople = this.GetRequestStr("txtApproverPeople"); string ApproverUnit = this.GetRequestStr("txtApproverUnit"); string HandlePeople = this.GetRequestStr("txtHandlePeople"); string BorrowDate = this.GetRequestStr("txtBorrowDate"); string ReturnDate = this.GetRequestStr("txtReturnDate");//归还时间--暂不需要 //string OperateTime = this.GetRequestStr("txtAddTime"); string Remark = this.GetRequestStr("txtRemark"); int id = this.GetRequestInt("id"); int line = 0; //定义增加受影响的行数 #region 判断输入信息 if (FileClassID.ToString() == "0") { new MessageBox(this.Page).Show("请选择案卷类型名称!"); return; } if (FileEnterName == "") { new MessageBox(this.Page).Show("请输入案卷名称!"); return; } if (BorrowPeople == "") { new MessageBox(this.Page).Show("请输入借阅人姓名!"); return; } if (BorrowUnit == "") { new MessageBox(this.Page).Show("请选择借阅人承办单位!"); return; } if (ApproverPeople == "") { new MessageBox(this.Page).Show("请输入批准人姓名!"); return; } if (ApproverUnit == "") { new MessageBox(this.Page).Show("请选择批准人承办单位!"); return; } if (HandlePeople == "") { new MessageBox(this.Page).Show("请输入经办人姓名!"); return; } if (BorrowDate == "") { new MessageBox(this.Page).Show("请选择借阅时间!"); return; } #endregion //判断该档案是否存在 DataTable dtfl = PublicQuery.GetDataDNJYTable(FileEnterName, FileClassID.ToString()); if (!AccessDataSet.HasDataTable(dtfl)) { new MessageBox(this.Page).Show("你案卷类型下不存在此案卷名称的案卷!"); return; } if (this.GetRequestInt("id") > 0) { line = dal.Update( dtfl.Rows[0]["id"].ToString(), FileClassID, FileClassName, FileEnterName, BorrowPeople, BorrowUnit, ApproverPeople, ApproverUnit, HandlePeople, BorrowDate, ReturnDate, //归还时间--暂不需要 DateTime.Now.ToString(), Remark, LoginUser.GetUserId, LoginUser.GetUserName, LoginUser.CountyId, id); if (line > 0) { if (ReturnDate == "") { fedal.UpdateFileEnterSLLX("", 2, FileClassID.ToString(), FileEnterName); } else { fedal.UpdateFileEnterSLLX("", 0, FileClassID.ToString(), FileEnterName); } new MessageBox(Page).ShowAndJump("编辑成功!", "FileBorrowList.aspx"); //操作日志 LogListDal.Insert(DateTime.Now, "档案借阅编辑成功", LoginUser.GetUserId, LoginUser.GetUserName); } else { new MessageBox(this.Page).Show("编辑失败!"); } } else { line = dal.Insert( dtfl.Rows[0]["id"].ToString(), FileClassID, FileClassName, FileEnterName, BorrowPeople, BorrowUnit, ApproverPeople, ApproverUnit, HandlePeople, BorrowDate, ReturnDate, //归还时间--暂不需要 DateTime.Now.ToString(), Remark, LoginUser.GetUserId, LoginUser.GetUserName, LoginUser.CountyId); if (line > 0) { if (ReturnDate == "") { fedal.UpdateFileEnterSLLX("", 2, FileClassID.ToString(), FileEnterName); } else { fedal.UpdateFileEnterSLLX("", 0, FileClassID.ToString(), FileEnterName); } new MessageBox(Page).ShowAndJump("增加成功!", "FileBorrowList.aspx"); //操作日志 LogListDal.Insert(DateTime.Now, "档案借阅增加成功", LoginUser.GetUserId, LoginUser.GetUserName); } else { new MessageBox(this.Page).Show("增加失败!"); } } }
/// <summary> /// 绑定数据源 /// </summary> private void BindDataList() { //执法案卷类别名称 DataTable dtSource = Utility.GetFileClassTree(); //获取数据信息 if (AccessDataSet.HasDataTable(dtSource)) { rptList.DataSource = dtSource; rptList.DataBind(); } //执法档案目录号 DataTable dtfile = filedal.GetDataTable(""); if (AccessDataSet.HasDataTable(dtfile)) { FileDirectoryID.DataSource = dtfile; this.FileDirectoryID.DataTextField = "FileDirName"; this.FileDirectoryID.DataValueField = "ID"; this.FileDirectoryID.DataBind(); this.FileDirectoryID.Items.Insert(0, new ListItem("--请选择--", "")); } //执法档案保管期限 DataTable dtS = savedal.GetDataTable(""); if (AccessDataSet.HasDataTable(dtS)) { SaveDeadlineID.DataSource = dtS; this.SaveDeadlineID.DataTextField = "YearName"; this.SaveDeadlineID.DataValueField = "ID"; this.SaveDeadlineID.DataBind(); this.SaveDeadlineID.Items.Insert(0, new ListItem("--请选择--", "")); } //执法档案处罚类型 DataTable dtwy = pusdal.GetDataTable(""); if (AccessDataSet.HasDataTable(dtwy)) { rxwhy.DataSource = dtwy; rxwhy.DataBind(); } //执法档案承办单位 DataTable dtor = ordal.GetDataTable(""); if (AccessDataSet.HasDataTable(dtor)) { this.drop_EnforcementName.DataSource = dtor; this.drop_EnforcementName.DataTextField = "OrganizerName"; this.drop_EnforcementName.DataValueField = "ID"; this.drop_EnforcementName.DataBind(); this.drop_EnforcementName.Items.Insert(0, new ListItem("--请选择--", "")); } this.drop_EnforcementName.SelectedValue = LoginUser.OrganizerId; this.drop_EnforcementName.Enabled = false; //执法档案库室 DataTable dtfl = fldal.GetDataTable(" and qxdm='" + LoginUser.CountyId + "'"); if (AccessDataSet.HasDataTable(dtfl)) { this.drop_FileLibraryName.DataSource = dtfl; this.drop_FileLibraryName.DataTextField = "FileLibraryName"; this.drop_FileLibraryName.DataValueField = "ID"; this.drop_FileLibraryName.DataBind(); this.drop_FileLibraryName.Items.Insert(0, new ListItem("--请选择--", "")); } //民族信息 DataTable dtmz = PublicQuery.GetDataMZTable(); if (AccessDataSet.HasDataTable(dtmz)) { this.PenalDocNation.DataSource = dtmz; this.PenalDocNation.DataTextField = "MzName"; this.PenalDocNation.DataValueField = "MzId"; this.PenalDocNation.DataBind(); } //行政区名称 #region 行政区名称 DataTable dtxzq = ardal.GetDataTable(""); //建设工程地址 if (AccessDataSet.HasDataTable(dtxzq)) { this.BuildAdsArea.DataSource = dtxzq; this.BuildAdsArea.DataTextField = "Name"; this.BuildAdsArea.DataValueField = "ID"; this.BuildAdsArea.DataBind(); this.BuildAdsArea.Items.Insert(0, new ListItem("--请选择--", "")); } //检查地址 if (AccessDataSet.HasDataTable(dtxzq)) { this.CheckAdsArea.DataSource = dtxzq; this.CheckAdsArea.DataTextField = "Name"; this.CheckAdsArea.DataValueField = "ID"; this.CheckAdsArea.DataBind(); this.CheckAdsArea.Items.Insert(0, new ListItem("--请选择--", "")); } //举报建设工程地址 if (AccessDataSet.HasDataTable(dtxzq)) { this.ComplainAdsArea.DataSource = dtxzq; this.ComplainAdsArea.DataTextField = "Name"; this.ComplainAdsArea.DataValueField = "ID"; this.ComplainAdsArea.DataBind(); this.ComplainAdsArea.Items.Insert(0, new ListItem("--请选择--", "")); } //活动举办地址 if (AccessDataSet.HasDataTable(dtxzq)) { this.MassSportsAdsArea.DataSource = dtxzq; this.MassSportsAdsArea.DataTextField = "Name"; this.MassSportsAdsArea.DataValueField = "ID"; this.MassSportsAdsArea.DataBind(); this.MassSportsAdsArea.Items.Insert(0, new ListItem("--请选择--", "")); } //违法人(单位)地址 if (AccessDataSet.HasDataTable(dtxzq)) { this.PunishAdsArea.DataSource = dtxzq; this.PunishAdsArea.DataTextField = "Name"; this.PunishAdsArea.DataValueField = "ID"; this.PunishAdsArea.DataBind(); this.PunishAdsArea.Items.Insert(0, new ListItem("--请选择--", "")); } //临时查封场所地址 if (AccessDataSet.HasDataTable(dtxzq)) { this.TempCloseArea.DataSource = dtxzq; this.TempCloseArea.DataTextField = "Name"; this.TempCloseArea.DataValueField = "ID"; this.TempCloseArea.DataBind(); this.TempCloseArea.Items.Insert(0, new ListItem("--请选择--", "")); } //强制执行对象地址 if (AccessDataSet.HasDataTable(dtxzq)) { this.ForceRunAdsArea.DataSource = dtxzq; this.ForceRunAdsArea.DataTextField = "Name"; this.ForceRunAdsArea.DataValueField = "ID"; this.ForceRunAdsArea.DataBind(); this.ForceRunAdsArea.Items.Insert(0, new ListItem("--请选择--", "")); } //申请复议、诉讼人(单位)地址 if (AccessDataSet.HasDataTable(dtxzq)) { this.ApplyFYArea.DataSource = dtxzq; this.ApplyFYArea.DataTextField = "Name"; this.ApplyFYArea.DataValueField = "ID"; this.ApplyFYArea.DataBind(); this.ApplyFYArea.Items.Insert(0, new ListItem("--请选择--", "")); } //申请国家赔偿人(单位)地址 if (AccessDataSet.HasDataTable(dtxzq)) { this.CountryPayAdsArea.DataSource = dtxzq; this.CountryPayAdsArea.DataTextField = "Name"; this.CountryPayAdsArea.DataValueField = "ID"; this.CountryPayAdsArea.DataBind(); this.CountryPayAdsArea.Items.Insert(0, new ListItem("--请选择--", "")); } //嫌疑人地址 if (AccessDataSet.HasDataTable(dtxzq)) { this.PenalDocAdsArea.DataSource = dtxzq; this.PenalDocAdsArea.DataTextField = "Name"; this.PenalDocAdsArea.DataValueField = "ID"; this.PenalDocAdsArea.DataBind(); this.PenalDocAdsArea.Items.Insert(0, new ListItem("--请选择--", "")); } //案发地址 if (AccessDataSet.HasDataTable(dtxzq)) { this.PenalDocCrimeAdsArea.DataSource = dtxzq; this.PenalDocCrimeAdsArea.DataTextField = "Name"; this.PenalDocCrimeAdsArea.DataValueField = "ID"; this.PenalDocCrimeAdsArea.DataBind(); this.PenalDocCrimeAdsArea.Items.Insert(0, new ListItem("--请选择--", "")); } #endregion //如果没有录入人默认显示当前用户名 this.txtEnterPeople.Text = LoginUser.GetUserName; }
private void GetValue() { DataRow dr = fedal.GetRow(this.GetRequestInt("id")); //获取传递的参数,编辑时ID主键 if (dr != null) { //执法档案库室 drop_FileLibraryName.Items.Clear(); DataTable dtfl = null; if (LoginUser.CountyId == "420100") { dtfl = fldal.GetDataTable(" "); } else { dtfl = fldal.GetDataTable(" and qxdm='" + LoginUser.CountyId + "'"); } if (AccessDataSet.HasDataTable(dtfl)) { this.drop_FileLibraryName.DataSource = dtfl; this.drop_FileLibraryName.DataTextField = "FileLibraryName"; this.drop_FileLibraryName.DataValueField = "ID"; this.drop_FileLibraryName.DataBind(); this.drop_FileLibraryName.Items.Insert(0, new ListItem("--请选择--", "")); } this.FileFondsNo.Text = dr["FileFondsNo"].ToStr(); this.FilesNum.Text = dr["FilesNum"].ToStr(); this.FileDirectoryID.SelectedValue = dr["FileDirectoryID"].ToStr(); this.SaveDeadlineID.SelectedValue = dr["SaveDeadlineID"].ToStr(); this.BuildAds.Text = dr["BuildAds"].ToStr(); this.BuildCheckT.Text = dr["BuildCheckT"].ToStr(); this.BuildFilingT.Text = dr["BuildFilingT"].ToStr(); this.BuildArea.Text = dr["BuildArea"].ToStr(); this.buildingHeight.Text = dr["buildingHeight"].ToStr(); this.BuildALicense.Text = dr["BuildALicense"].ToStr(); this.CheckAds.Text = dr["CheckAds"].ToStr(); this.CheckNature.Text = dr["CheckNature"].ToStr(); this.CheckResult.Text = dr["CheckResult"].ToStr(); this.ComplainAds.Text = dr["ComplainAds"].ToStr(); this.ComplainResult.Text = dr["ComplainResult"].ToStr(); this.FireNature.Text = dr["FireNature"].ToStr(); this.FireArea.Text = dr["FireArea"].ToStr(); this.FireEstateLoss.Text = dr["FireEstateLoss"].ToStr(); this.FireHPeople.Text = dr["FireHPeople"].ToStr(); this.FireDPeople.Text = dr["FireDPeople"].ToStr(); this.MassSportsAds.Text = dr["MassSportsAds"].ToStr(); this.MassSportsResult.Text = dr["MassSportsResult"].ToStr(); string ptypeID = dr["PunishTypeID"].ToStr(); if (ptypeID.IndexOf('0') != -1) { this.PunishTypeID0.Checked = true; } if (ptypeID.IndexOf('1') != -1) { this.PunishTypeID1.Checked = true; } if (ptypeID.IndexOf('2') != -1) { this.PunishTypeID2.Checked = true; } if (ptypeID.IndexOf('3') != -1) { this.PunishTypeID3.Checked = true; } if (ptypeID.IndexOf('4') != -1) { this.PunishTypeID4.Checked = true; } //this.PunishTypeID.Text = dr["PunishTypeID"].ToStr(); this.PunishFinePay.Text = dr["PunishFinePay"].ToStr(); this.PunishParts.Text = dr["PunishParts"].ToStr(); this.TempClose.Text = dr["TempClose"].ToStr(); this.TempDay.Text = dr["TempDay"].ToStr(); this.ForceRunAds.Text = dr["ForceRunAds"].ToStr(); this.ForcePunish.Text = dr["ForcePunish"].ToStr(); this.ApplyReviewPeople.Text = dr["ApplyReviewPeople"].ToStr(); this.CountryPayAds.Text = dr["CountryPayAds"].ToStr(); this.PenalDocSex.Text = dr["PenalDocSex"].ToStr(); this.PenalDocBirthday.Text = dr["PenalDocBirthday"].ToStr(); this.PenalDocNation.Text = dr["PenalDocNation"].ToStr(); this.PenalDocAds.Text = dr["PenalDocAds"].ToStr(); this.PenalDocCrimeAds.Text = dr["PenalDocCrimeAds"].ToStr(); //this.PenalDocResult.Text = dr["PenalDocResult"].ToStr(); //案件危害后果 this.BuildUnitName.Text = dr["BuildUnitName"].ToStr(); this.BuildItemName.Text = dr["BuildItemName"].ToStr(); this.CheckUnitName.Text = dr["CheckUnitName"].ToStr(); this.ComplainPeople.Text = dr["ComplainPeople"].ToStr(); this.ComplainNPeople.Text = dr["ComplainNPeople"].ToStr(); this.CompainN.Text = dr["CompainN"].ToStr(); this.MassSportsPeople.Text = dr["MassSportsPeople"].ToStr(); this.MassSportName.Text = dr["MassSportName"].ToStr(); this.FireAds.Text = dr["FireAds"].ToStr(); this.FireUnitName.Text = dr["FireUnitName"].ToStr(); this.FireDateTime.Text = dr["FireDateTime"].ToStr(); this.FireN.Text = dr["FireN"].ToStr(); this.PunishMain.Text = dr["PunishMain"].ToStr(); this.TempUintName.Text = dr["TempUintName"].ToStr(); this.TempN.Text = dr["TempN"].ToStr(); this.TempDX.Text = dr["TempDX"].ToStr(); this.ForceUnitName.Text = dr["ForceUnitName"].ToStr(); this.ForceN.Text = dr["ForceN"].ToStr(); this.ApplyFY.Text = dr["ApplyFY"].ToStr(); this.CountryMain.Text = dr["CountryMain"].ToStr(); this.PenalName.Text = dr["PenalName"].ToStr(); this.PenalZN.Text = dr["PenalZN"].ToStr(); this.ApplyNContent.Text = dr["ApplyNContent"].ToStr(); this.PunishAds.Text = dr["PunishAds"].ToStr(); this.ApplyMain.Text = dr["ApplyMain"].ToStr(); //修改后的代码 this.drop_EnforcementName.SelectedValue = dr["EnforcementID"].ToStr(); this.txt_EnforcementPeople.Text = dr["EnforcementPeople"].ToStr(); this.txt_EnforcementPeople2.Text = dr["EnforcementPeople2"].ToStr(); this.txt_EnforcementDate.Text = dr["EnforcementDate"].ToStr(); this.txt_EnforcementDate2.Text = dr["EnforcementDate2"].ToStr(); this.txtEnterPeople.Text = dr["EnterPeople"].ToStr(); this.fStarttime.Text = Convert.ToDateTime(dr["EnterDate"]).ToString("yyyy-MM-dd"); //录入时间自动生成 this.drop_FileLibraryName.SelectedValue = dr["FileLibraryID"].ToStr(); this.PicDocumentNo1.Text = dr["PicDocumentNo"].ToStr(); this.PicDicL1.Text = dr["PicDicL"].ToStr(); this.EngDroping1.Text = dr["EngDroping"].ToStr(); this.PicDocumentNo2.Text = dr["PicDocumentNo"].ToStr(); this.PicDicL2.Text = dr["PicDicL"].ToStr(); this.EngDroping2.Text = dr["EngDroping"].ToStr(); this.YesUnit.Text = dr["YesUnit"].ToStr(); this.CheckItemName.Text = dr["CheckItemName"].ToStr(); this.txt_ghmj.Text = dr["Ghmj"].ToStr(); this.txt_ccss.Text = dr["Ccss"].ToStr(); this.txt_srs.Text = dr["Srs"].ToStr(); this.txt_wrs.Text = dr["Wrs"].ToStr(); //2013-12-30 行政区 this.BuildAdsArea.SelectedValue = dr["BuildAdsArea"].ToStr(); this.CheckAdsArea.SelectedValue = dr["CheckAdsArea"].ToStr(); this.ComplainAdsArea.SelectedValue = dr["ComplainAdsArea"].ToStr(); this.MassSportsAdsArea.SelectedValue = dr["MassSportsAdsArea"].ToStr(); this.PunishAdsArea.SelectedValue = dr["PunishAdsArea"].ToStr(); this.TempCloseArea.SelectedValue = dr["TempCloseArea"].ToStr(); this.ForceRunAdsArea.SelectedValue = dr["ForceRunAdsArea"].ToStr(); this.ApplyFYArea.SelectedValue = dr["ApplyFYArea"].ToStr(); this.CountryPayAdsArea.SelectedValue = dr["CountryPayAdsArea"].ToStr(); this.PenalDocAdsArea.SelectedValue = dr["PenalDocAdsArea"].ToStr(); this.PenalDocCrimeAdsArea.SelectedValue = dr["PenalDocCrimeAdsArea"].ToStr(); //2013-12-31 排架号 this.Columns.Text = dr["Columns"].ToStr(); //列 this.Cupboard.Text = dr["Cupboard"].ToStr(); //柜 this.Frame.Text = dr["Frame"].ToStr(); //架 for (int i = 0; i < rptList.Items.Count; i++) { int fid = ((Label)rptList.Items[i].FindControl("FileClassID")).Text.ToInt32(); if (fid == dr["FileClassID"].ToInt32()) { DataRow drFc = fcdal.GetRow(fid); int intype = 0; if (drFc != null) { intype = drFc["Intype"].ToInt32(); } CheckBox cb = (CheckBox)rptList.Items[i].FindControl("cl1_000"); cb.Checked = true; ClientScript.RegisterStartupScript(this.GetType(), "script", "check(0," + intype + ",0,0);", true); } } for (int i = 0; i < rxwhy.Items.Count; i++) { int fid = ((Label)rxwhy.Items[i].FindControl("PunishWhy")).Text.ToInt32(); if (fid == dr["PunishWhy"].ToInt32()) { DataRow drFc2 = fcdal.GetRow(fid); int intype2 = 0; if (drFc2 != null) { intype2 = drFc2["id"].ToInt32(); } CheckBox cb2 = (CheckBox)rxwhy.Items[i].FindControl("ckb6"); cb2.Checked = true; ClientScript.RegisterStartupScript(this.GetType(), "script", "check(0,'cc1'," + intype2 + ",1);", true); } } if (dr["CheckNaturefc"].ToInt32() == 1) { this.CheckNaturefc.Checked = true; } if (this.GetRequestInt("flag") == 1) //如果是查看则禁用掉所有文本框 { Utility.initControl(Page, ""); } } }
//批量归档 protected void btnSave_Click(object sender, EventArgs e) { if (this.drop_FileLibraryName.SelectedItem.Text == "") { new MessageBox(this.Page).Show("请选择档案库室!"); return; } string ids = "0"; for (int i = 0; i < rptList.Items.Count; i++) { int id = ((Label)rptList.Items[i].FindControl("lb_id")).Text.ToInt32(); CheckBox cb = (CheckBox)rptList.Items[i].FindControl("cb_id"); if (cb.Checked) { ids += "," + id; } } if (ids == "0") { new MessageBox(this.Page).Show("请选择需要归档的档案!"); return; } //int line = dal.UpdateAllGD(this.drop_FileLibraryName.SelectedValue, this.drop_FileLibraryName.SelectedItem.Text, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), ids); DataTable dtgd = dal.GetDataTableyjzd(" and id in (" + ids + ")"); if (AccessDataSet.HasDataTable(dtgd)) { ArrayList alsql = new ArrayList(); foreach (DataRow item in dtgd.Rows) { if (item["FileTransferSJLX"].ToString() == "1" && item["FileTransferID"].ToString() != "") { string sqlStr = ""; //移交记录归档 sqlStr = " update FileTransfer set sjzt=3,Gdr='" + LoginUser.GetUserName + "',Gdsj='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' where id='" + item["FileTransferID"] + "' "; alsql.Add(sqlStr); string strupdate = ""; //移交档案归档 strupdate = " update FileEnter set FileLibraryID='" + this.drop_FileLibraryName.SelectedValue + "',FileLibraryName='" + this.drop_FileLibraryName.SelectedItem.Text + "',FileLibraryData='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',FileTransferSJLX=2 where id='" + item["ID"] + "' "; alsql.Add(strupdate); } else { string strupdate = ""; //移交档案归档 strupdate = " update FileEnter set FileLibraryID='" + this.drop_FileLibraryName.SelectedValue + "',FileLibraryName='" + this.drop_FileLibraryName.SelectedItem.Text + "',FileLibraryData='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' where id='" + item["ID"] + "' "; alsql.Add(strupdate); } } Boolean flag = TSQLServer.execTriggerAll(alsql); if (flag == true) { new MessageBox(Page).ShowAndJump("执法档案批量归档成功!", "FileEnterList.aspx"); //操作日志 LogListDal.Insert(DateTime.Now, "归档执法档案" + ids + "批量归档", LoginUser.GetUserId, LoginUser.GetUserName); } else { new MessageBox(Page).ShowAndJump("执法档案批量归档失败!", "FileEnterList.aspx"); } } else { new MessageBox(Page).ShowAndJump("执法档案批量归档失败!", "FileEnterList.aspx"); } this.BindDaSource(); }
protected void btnLogin_Click(object sender, EventArgs e) { if (txtusername.Text.Trim() == string.Empty || txtUserPwd.Text.Trim() == string.Empty) { new MessageBox(this).Show("用户名或密码不能为空"); return; } else { if (txtusername.Text.Trim() == "Administrator" || txtUserPwd.Text.Trim() == "Administrator123abc!") { LoginUser.GetUserName = "******"; LoginUser.GetUserId = Convert.ToInt32(-1); LoginUser.CountyId = "420100"; LoginUser.OrganizerId = "1"; LoginUser.OrganizerName = "武汉消防支队"; //更新登录日期 dal.UpdateLastLogin(DateTime.Now, LoginUser.GetUserId); //操作日志 LogListDal.Insert(DateTime.Now, "用户登录", LoginUser.GetUserId, LoginUser.GetUserName); Response.Redirect("Manager/Index.aspx"); } else { string strUser = txtusername.Text.Trim(); string strPwd = Security.Encode(this.GetRequestStr("txtUserPwd").Trim()); DataTable uaData = dal.GetUserLoginInfor(strUser, strPwd); if (AccessDataSet.HasDataTable(uaData)) { if (uaData.Rows[0]["userState"].ToString() == "1") { new MessageBox(this).Show("登录失败,帐号已锁定,请先将帐号解锁"); return; } else { if (uaData.Rows[0]["userPost"].ToString() == "超级用户") { LoginUser.GetUserName = uaData.Rows[0]["userName"].ToString(); LoginUser.GetUserId = Convert.ToInt32(uaData.Rows[0]["id"].ToString()); LoginUser.CountyId = "420000"; LoginUser.OrganizerId = "-1"; LoginUser.OrganizerName = "超级用户"; } else { LoginUser.GetUserName = uaData.Rows[0]["userName"].ToString(); LoginUser.GetUserId = Convert.ToInt32(uaData.Rows[0]["id"].ToString()); LoginUser.CountyId = uaData.Rows[0]["userqxdm"].ToString(); LoginUser.OrganizerId = uaData.Rows[0]["ogid"].ToString(); LoginUser.OrganizerName = uaData.Rows[0]["OrganizerName"].ToString(); } //更新登录日期 dal.UpdateLastLogin(DateTime.Now, LoginUser.GetUserId); //操作日志 LogListDal.Insert(DateTime.Now, "用户登录", LoginUser.GetUserId, LoginUser.GetUserName); Response.Redirect("Manager/Index.aspx"); } } else { new MessageBox(this).Show("用户名或密码错误"); return; } } } }
/// <summary> /// 保存操作 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSave_Click(object sender, EventArgs e) { //获取界面数值赋值给model对象 int FileClassID = this.GetRequestInt("txtFileClassID"); string FileClassName = this.txtFileClassID.SelectedItem.Text.Trim('-'); string FileEnterName = this.GetRequestStr("txtFileEnterName"); string ApproverPeople = this.GetRequestStr("txtApproverPeople"); string ApproverUnit = this.GetRequestStr("txtApproverUnit"); string SupervisePeople = this.GetRequestStr("txtSupervisePeople"); string SuperviseUnit = this.GetRequestStr("txtSuperviseUnit"); string DestroyPeople = this.GetRequestStr("txtDestroyPeople"); string DestroyDate = this.GetRequestStr("txtDestroyDate"); string DestroyAds = this.GetRequestStr("txtDestroyAds");//归还时间--暂不需要 string Remark = this.GetRequestStr("txtRemark"); int id = this.GetRequestInt("id"); #region 判断输入信息 if (FileClassID.ToString() == "0") { new MessageBox(this.Page).Show("请选择案卷类型名称!"); return; } if (FileEnterName == "") { new MessageBox(this.Page).Show("请输入案卷名称!"); return; } if (ApproverPeople == "") { new MessageBox(this.Page).Show("请输入批准人姓名!"); return; } if (ApproverUnit == "") { new MessageBox(this.Page).Show("请选择批准人承办单位!"); return; } if (SupervisePeople == "") { new MessageBox(this.Page).Show("请输入监督人姓名!"); return; } if (SuperviseUnit == "") { new MessageBox(this.Page).Show("请选择监督人承办单位!"); return; } if (DestroyPeople == "") { new MessageBox(this.Page).Show("请输入销毁人姓名!"); return; } if (DestroyAds == "") { new MessageBox(this.Page).Show("请输入销毁地点!"); return; } if (DestroyDate == "") { new MessageBox(this.Page).Show("请选择销毁时间!"); return; } #endregion int line = 0; //定义增加受影响的行数 //判断该档案是否存在 DataTable dtfl = PublicQuery.GetDataDNJYTable(FileEnterName, FileClassID.ToString()); if (!AccessDataSet.HasDataTable(dtfl)) { new MessageBox(this.Page).Show("你案卷类型下不存在此案卷名称的案卷!"); return; } if (this.GetRequestInt("id") > 0) { line = dal.Update( dtfl.Rows[0]["id"].ToString(), FileClassID, FileClassName, FileEnterName, ApproverPeople, ApproverUnit, SupervisePeople, SuperviseUnit, DestroyPeople, DestroyDate, DestroyAds, DateTime.Now.ToString(), Remark, LoginUser.GetUserId, LoginUser.GetUserName, LoginUser.CountyId, id); if (line > 0) { fedal.UpdateFileEnterSLLX("", 1, FileClassID.ToString(), FileEnterName); new MessageBox(Page).ShowAndJump("编辑成功!", "FileDestroyList.aspx"); //操作日志 LogListDal.Insert(DateTime.Now, "档案销毁编辑成功", LoginUser.GetUserId, LoginUser.GetUserName); } else { new MessageBox(this.Page).Show("编辑失败!"); } } else { line = dal.Insert( dtfl.Rows[0]["id"].ToString(), FileClassID, FileClassName, FileEnterName, ApproverPeople, ApproverUnit, SupervisePeople, SuperviseUnit, DestroyPeople, DestroyDate, DestroyAds, DateTime.Now.ToString(), Remark, LoginUser.GetUserId, LoginUser.GetUserName, LoginUser.CountyId); if (line > 0) { fedal.UpdateFileEnterSLLX("", 1, FileClassID.ToString(), FileEnterName); new MessageBox(Page).ShowAndJump("增加成功!", "FileDestroyList.aspx"); //操作日志 LogListDal.Insert(DateTime.Now, "档案销毁增加成功", LoginUser.GetUserId, LoginUser.GetUserName); } else { new MessageBox(this.Page).Show("增加失败!"); } } }