protected void Page_Load(object sender, EventArgs e) { hkdb.VeriSess("1"); if (!IsPostBack) { if (this.Session["systype"].ToString() == "G") { p_gys.Visible = false; } SqlDataReader dr = SqlHelper.ExecuteReader("SELECT photo,UI_ID,UI_DESC,UI_SEX,UI_BGDH,UI_YDDH,UI_CZDH,UI_MAIL,UI_CSRQ,UI_RZRQ,B.BM_MC,C.ZWMC,D.QY_QC FROM YH A LEFT OUTER JOIN BM B ON(A.UI_SSBM=B.BM_ID) LEFT OUTER JOIN ZW C ON(A.UI_ZW=C.ZWID) LEFT OUTER JOIN QY D ON (A.UI_SSGS=D.QY_ID) WHERE UI_ID='" + this.Session["userid"] + "'"); if (dr.Read()) { yhbm.Text = dr["ui_id"].ToString(); xm.Text = dr["ui_desc"].ToString(); xb.SelectedValue = dr["ui_sex"].ToString(); bgdh.Text = dr["ui_bgdh"].ToString(); yddh.Text = dr["ui_yddh"].ToString(); czdh.Text = dr["ui_czdh"].ToString(); mail.Text = dr["ui_mail"].ToString(); csrq.Text = hkdb.GetDate(dr["ui_csrq"].ToString()); bm.Text = dr["bm_mc"].ToString(); zw.Text = dr["zwmc"].ToString(); ssgs.Text = dr["qy_qc"].ToString(); rzrq.Text = hkdb.GetDate(dr["ui_rzrq"].ToString()); fjNumber.Text = dr["photo"].ToString(); } dr.Close(); } }
protected void Page_Load(object sender, EventArgs e) { hkdb.VeriSess("4"); if (!IsPostBack) { hkdb.PassTo("11716", "0"); //短信 dxtz.Visible = Convert.ToBoolean(hkdb.VeriSms()); if (!string.IsNullOrEmpty(Request.QueryString["id"])) { SqlDataReader dr = SqlHelper.ExecuteReader("SELECT A.* FROM OA_KQ_QJD01 A WHERE QID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "' AND CHARINDEX('" + this.Session["userid"] + "',jsrIDs)>0 AND QJZT='已审批'"); if (dr.Read()) { lblqjlx.Text = dr["qjlx"].ToString(); lblgjlb.Text = dr["gjlb"].ToString(); lblqjkssj.Text = hkdb.GetDate(dr["qjkssj"].ToString()); lblqjkssd.Text = dr["qjkssd"].ToString(); lblqjjssj.Text = hkdb.GetDate(dr["qjjssj"].ToString()); lblqjjssd.Text = dr["qjjssd"].ToString(); lblqjts.Text = dr["qjts"].ToString(); lblqjly.Text = dr["qjly"].ToString(); lblgztzqk.Text = dr["gztzqk"].ToString(); sqrid.Text = dr["sqrid"].ToString(); lblsqr.Text = dr["sqrmc"].ToString(); sssj.Text = dr["sssj"].ToString(); lblspr.Text = dr["jsrNames"].ToString(); lblsqbmmc.Text = dr["sqbmmc"].ToString(); lblsqsj.Text = dr["sqsj"].ToString(); Number.Text = dr["qjfj"].ToString(); dr.Close(); bd.GetAtt(Number.Text, "o2", "oa/qjd", fujian); GridViewBind(); } else { dr.Close(); mydb.Alert_Close("该记录已确认完成,无需重复确认!"); } } else { mydb.Alert_Close("此记录不存在,可能已被删除!"); } } }
protected void Page_Load(object sender, EventArgs e) { mydb hkdb = new mydb(); hkdb.VeriSess("4"); if (!IsPostBack) { qy_fjylurl.Text = Convert.ToString(SqlHelper.ExecuteScalar("SELECT qy_fjylurl FROM qy WHERE qy_id='001'")); SqlDataReader datar = SqlHelper.ExecuteReader("select a.*,b.flmc from OA_XWNR a,oa_xwfl b where a.fl=b.flid and xwid='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'"); if (datar.Read()) { lblxwbt.Text = datar["xwbt"].ToString(); lblxwzy.Text = datar["xwzy"].ToString(); lblxwly.Text = datar["xwly"].ToString(); lblxwfl.Text = datar["flmc"].ToString(); lblxwzz.Text = datar["xwzz"].ToString(); lblnr.Text = datar["xwnr"].ToString(); lblxwsj.Text = hkdb.GetDate(datar["xwsj"].ToString()); savefj.Text = datar["fjmc"].ToString(); savelj.Text = datar["fjlj"].ToString(); savefj.NavigateUrl = (datar["fjlj"] == System.DBNull.Value ? "" : "../.." + datar["fjlj"].ToString()) + datar["fjmc"].ToString(); datar.Close(); } else { datar.Close(); mydb.Alert("此记录不存在,可能已被删除!"); } } }
protected void Page_Load(object sender, EventArgs e) { mydb hkdb = new mydb(); hkdb.VeriSess("9"); if (!IsPostBack) { SqlDataReader dr = SqlHelper.ExecuteReader("SELECT UI_ID,UI_DESC,UI_SEX,UI_BGDH,UI_YDDH,UI_CZDH,UI_MAIL,UI_CSRQ,UI_RZRQ,B.BM_MC,C.ZWMC,D.QY_QC FROM YH A LEFT OUTER JOIN BM B ON(A.UI_SSBM=B.BM_ID) LEFT OUTER JOIN ZW C ON(A.UI_ZW=C.ZWID) LEFT OUTER JOIN QY D ON (A.UI_SSGS=D.QY_ID) WHERE UI_ID='" + this.Session["userid"] + "'"); if (dr.Read()) { txtyhbm.Text = dr["ui_id"].ToString(); txtxm.Text = dr["ui_desc"].ToString(); xb.Text = dr["ui_sex"].ToString(); bgdh.Text = dr["ui_bgdh"].ToString(); yddh.Text = dr["ui_yddh"].ToString(); czdh.Text = dr["ui_czdh"].ToString(); mail.Text = dr["ui_mail"].ToString(); //csrq.Text = hkdb.GetDate(dr["ui_csrq"].ToString()); txtbm.Text = dr["bm_mc"].ToString(); txtzw.Text = dr["zwmc"].ToString(); txtssgs.Text = dr["qy_qc"].ToString(); txtrzrq.Text = hkdb.GetDate(dr["ui_rzrq"].ToString()); } dr.Close(); } }
protected void Page_Load(object sender, EventArgs e) { hkdb.VeriSess("4"); if (!IsPostBack) { hkdb.PassTo("11728", "0"); if (!string.IsNullOrEmpty(Request.QueryString["id"])) { SqlDataReader dr = SqlHelper.ExecuteReader("SELECT * from OA_KQ_QJD01 WHERE QID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'"); if (dr.Read()) { qjlx.SelectedValue = dr["qjlx"].ToString(); gjlb.SelectedValue = dr["gjlb"].ToString(); qjkssj.Text = hkdb.GetDate(dr["qjkssj"].ToString()); qjkssd.SelectedValue = dr["qjkssd"].ToString(); qjjssj.Text = hkdb.GetDate(dr["qjjssj"].ToString()); qjjssd.SelectedValue = dr["qjjssd"].ToString(); qjts.Text = dr["qjts"].ToString(); lblqjly.Text = dr["qjly"].ToString(); lblgztzqk.Text = dr["gztzqk"].ToString(); lblsqr.Text = dr["sqrmc"].ToString(); lblsqbmmc.Text = dr["sqbmmc"].ToString(); Number.Text = dr["qjfj"].ToString(); bgyy.Text = dr["bgyy"].ToString(); dr.Close(); if (qjlx.SelectedValue == "公假") { lblgjlb.Visible = true; gjlb.Visible = true; } bd.GetAtt(Number.Text, "o2", "oa/qjd", fujian); } else { dr.Close(); } } else { mydb.Alert_Close("此记录不存在,可能已被删除!"); } } }
protected void Page_Load(object sender, EventArgs e) { hkdb.VeriSess("4"); if (!IsPostBack) { hkdb.PassTo("11716", "0"); if (!string.IsNullOrEmpty(Request.QueryString["id"])) { SqlDataReader dr = SqlHelper.ExecuteReader("SELECT DISTINCT * from OA_KQ_QJD02 A LEFT OUTER JOIN OA_KQ_QJD01 B ON(A.SSQID=B.QID) WHERE B.QID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "' AND A.SPRID='" + this.Session["userid"] + "' AND A.SPZT='确认完成'"); if (dr.Read()) { lblqjlx.Text = dr["qjlx"].ToString(); lblgjlb.Text = dr["gjlb"].ToString(); lblqjkssj.Text = hkdb.GetDate(dr["qjkssj"].ToString()); lblqjkssd.Text = dr["qjkssd"].ToString(); lblqjjssj.Text = hkdb.GetDate(dr["qjjssj"].ToString()); lblqjjssd.Text = dr["qjjssd"].ToString(); lblqjts.Text = dr["qjts"].ToString(); lblqjly.Text = dr["qjly"].ToString(); lblgztzqk.Text = dr["gztzqk"].ToString(); lblsqr.Text = dr["sqrmc"].ToString(); sssj.Text = dr["sssj"].ToString(); lblspr.Text = dr["jsrNames"].ToString(); lblsqbmmc.Text = dr["sqbmmc"].ToString(); lblsqsj.Text = dr["sqsj"].ToString(); Number.Text = dr["qjfj"].ToString(); dr.Close(); bd.GetAtt(Number.Text, "o2", "oa/qjd", fujian); GridViewBind(); } else { dr.Close(); } } else { mydb.Alert_Close("此记录不存在,可能已被删除!"); } } }
protected void Page_Load(object sender, EventArgs e) { hkdb.VeriSess("4"); if (!IsPostBack) { hkdb.PassTo("11730", "0"); if (!string.IsNullOrEmpty(Request.QueryString["id"])) { SqlDataReader dr = SqlHelper.ExecuteReader("SELECT * from OA_KQXX WHERE RYBH='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "' AND KQRQ='" + hkdb.GetStr(Request.QueryString["rq"].ToString()) + "'"); if (dr.Read()) { rybh.Text = dr["rybh"].ToString(); xm.Text = dr["xm"].ToString(); kqrq.Text = hkdb.GetDate(dr["kqrq"].ToString()); sb1.Text = dr["sb1"].ToString(); xb2.Text = dr["xb2"].ToString(); sb3.Text = dr["sb3"].ToString(); xb4.Text = dr["xb4"].ToString(); sb5.Text = dr["sb5"].ToString(); xb6.Text = dr["xb6"].ToString(); cdcs1.Text = dr["cdcs1"].ToString(); ztcs1.Text = dr["ztcs1"].ToString(); wqdcs1.Text = dr["wqdcs1"].ToString(); wqtcs1.Text = dr["wqtcs1"].ToString(); kgcs1.Text = dr["kgcs1"].ToString(); cdcs2.Text = dr["cdcs2"].ToString(); ztcs2.Text = dr["ztcs2"].ToString(); wqdcs2.Text = dr["wqdcs2"].ToString(); wqtcs2.Text = dr["wqtcs2"].ToString(); kgcs2.Text = dr["kgcs2"].ToString(); cdcs3.Text = dr["cdcs3"].ToString(); ztcs3.Text = dr["ztcs3"].ToString(); wqdcs3.Text = dr["wqdcs3"].ToString(); wqtcs3.Text = dr["wqtcs3"].ToString(); kgcs3.Text = dr["kgcs3"].ToString(); bgyy.Text = dr["bgyy"].ToString(); dr.Close(); } else { dr.Close(); } } else { mydb.Alert_Close("此记录不存在,可能已被删除!"); } } }
protected void Page_Load(object sender, EventArgs e) { hkdb.VeriSess("4"); if (!IsPostBack) { hkdb.PassTo("11718", "0"); //短信 dxtz.Visible = Convert.ToBoolean(hkdb.VeriSms()); if (!string.IsNullOrEmpty(Request.QueryString["id"])) { SqlDataReader dr = SqlHelper.ExecuteReader("SELECT A.* FROM OA_KQ_SM01 A WHERE SID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "' AND CHARINDEX('" + this.Session["userid"] + "',jsrIDs)>0 AND SMZT='已审批'"); if (dr.Read()) { lblqdsj.Text = hkdb.GetDate(dr["qdsj"].ToString()); ynqd1.Checked = hkdb.GetValueChk_Checked(dr["ynqd1"].ToString()); ynqt1.Checked = hkdb.GetValueChk_Checked(dr["ynqt1"].ToString()); ynqd2.Checked = hkdb.GetValueChk_Checked(dr["ynqd2"].ToString()); ynqt2.Checked = hkdb.GetValueChk_Checked(dr["ynqt2"].ToString()); ynqd3.Checked = hkdb.GetValueChk_Checked(dr["ynqd3"].ToString()); ynqt3.Checked = hkdb.GetValueChk_Checked(dr["ynqt3"].ToString()); lblkqqksm.Text = dr["kqqksm"].ToString(); lblsqr.Text = dr["sqrmc"].ToString(); sssj.Text = dr["sssj"].ToString(); lblspr.Text = dr["jsrNames"].ToString(); sqrid.Text = dr["sqrid"].ToString(); lblsqbmmc.Text = dr["sqbmmc"].ToString(); lblsqsj.Text = dr["sqsj"].ToString(); Number.Text = dr["smfj"].ToString(); lblsscs.Text = dr["sscs"].ToString(); dr.Close(); bd.GetAtt(Number.Text, "o3", "oa/kqsm", fujian); GridViewBind(); } else { dr.Close(); mydb.Alert_Close("该记录已确认完成,无需重复确认!"); } } else { mydb.Alert_Close("此记录不存在,可能已被删除!"); } } }
protected void Page_Load(object sender, EventArgs e) { hkdb.VeriSess("4"); if (!IsPostBack) { hkdb.PassTo("11102", "0"); DropDownListBind_fl(); qy_fjylurl.Text = Convert.ToString(SqlHelper.ExecuteScalar("SELECT qy_fjylurl FROM qy WHERE qy_id='001'")); lblAttachSize.Text = Convert.ToString(SqlHelper.ExecuteScalar("SELECT P_STRING FROM hk_CSDA WHERE PARAMT='P_fj_size'")); //短信 dxtz.Visible = Convert.ToBoolean(hkdb.VeriSms()); if (!string.IsNullOrEmpty(Request.QueryString["id"])) { lbltitle.Text = "修改"; SqlDataReader datar = SqlHelper.ExecuteReader("select * from OA_XWNR where xwid='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "' and zt='草稿'"); if (datar.Read()) { xwbt.Text = datar["xwbt"].ToString(); xwzy.Text = datar["xwzy"].ToString(); xwly.Text = datar["xwly"].ToString(); xwfl.SelectedValue = datar["fl"].ToString(); xwzz.Text = datar["xwzz"].ToString(); editor.Value = datar["xwnr"].ToString(); xwsj.Text = hkdb.GetDate(datar["xwsj"].ToString()); savefj.Text = datar["fjmc"].ToString(); savelj.Text = datar["fjlj"].ToString(); savefj.NavigateUrl = (datar["fjlj"] == System.DBNull.Value ? "" : "../.." + datar["fjlj"].ToString()) + datar["fjmc"].ToString(); datar.Close(); } else { datar.Close(); mydb.Alert_Close("此记录不存在,可能已被删除!"); } } else { lbltitle.Text = "新增"; SendBtn.Enabled = false; } } }
protected void Page_Load(object sender, EventArgs e) { hkdb.VeriSess("4"); if (!IsPostBack) { hkdb.PassTo("11726,11730", "0"); if (!string.IsNullOrEmpty(Request.QueryString["id"])) { SqlDataReader dr = SqlHelper.ExecuteReader("SELECT A.* FROM OA_KQ_SM01 A WHERE SID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'"); if (dr.Read()) { lblqdsj.Text = hkdb.GetDate(dr["qdsj"].ToString()); ynqd1.Checked = hkdb.GetValueChk_Checked(dr["ynqd1"].ToString()); ynqt1.Checked = hkdb.GetValueChk_Checked(dr["ynqt1"].ToString()); ynqd2.Checked = hkdb.GetValueChk_Checked(dr["ynqd2"].ToString()); ynqt2.Checked = hkdb.GetValueChk_Checked(dr["ynqt2"].ToString()); ynqd3.Checked = hkdb.GetValueChk_Checked(dr["ynqd3"].ToString()); ynqt3.Checked = hkdb.GetValueChk_Checked(dr["ynqt3"].ToString()); lblkqqksm.Text = dr["kqqksm"].ToString(); lblsqr.Text = dr["sqrmc"].ToString(); sssj.Text = dr["sssj"].ToString(); lblspr.Text = dr["jsrNames"].ToString(); lblsqbmmc.Text = dr["sqbmmc"].ToString(); lblsqsj.Text = dr["sqsj"].ToString(); Number.Text = dr["smfj"].ToString(); lblsscs.Text = dr["sscs"].ToString(); dr.Close(); bd.GetAtt(Number.Text, "o3", "oa/kqsm", fujian); GridViewBind(); } else { dr.Close(); mydb.Alert_Close("此记录不存在,可能已被删除!"); } } else { mydb.Alert_Close("此记录不存在,可能已被删除!"); } } }
protected void Page_Load(object sender, EventArgs e) { hkdb.VeriSess("4"); if (!IsPostBack) { hkdb.PassTo("11718", "0"); if (!string.IsNullOrEmpty(Request.QueryString["id"])) { SqlDataReader dr = SqlHelper.ExecuteReader("SELECT DISTINCT * from OA_KQ_SM02 A LEFT OUTER JOIN OA_KQ_SM01 B ON(A.SSSID=B.SID) WHERE B.SID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "' AND A.SPRID='" + this.Session["userid"] + "' AND A.SPZT='确认完成'"); if (dr.Read()) { lblqdsj.Text = hkdb.GetDate(dr["qdsj"].ToString()); ynqd1.Checked = hkdb.GetValueChk_Checked(dr["ynqd1"].ToString()); ynqt1.Checked = hkdb.GetValueChk_Checked(dr["ynqt1"].ToString()); ynqd2.Checked = hkdb.GetValueChk_Checked(dr["ynqd2"].ToString()); ynqt2.Checked = hkdb.GetValueChk_Checked(dr["ynqt2"].ToString()); ynqd3.Checked = hkdb.GetValueChk_Checked(dr["ynqd3"].ToString()); ynqt3.Checked = hkdb.GetValueChk_Checked(dr["ynqt3"].ToString()); lblkqqksm.Text = dr["kqqksm"].ToString(); lblsqr.Text = dr["sqrmc"].ToString(); sssj.Text = dr["sssj"].ToString(); lblspr.Text = dr["jsrNames"].ToString(); lblsqbmmc.Text = dr["sqbmmc"].ToString(); lblsqsj.Text = dr["sqsj"].ToString(); Number.Text = dr["smfj"].ToString(); lblsscs.Text = dr["sscs"].ToString(); dr.Close(); bd.GetAtt(Number.Text, "o3", "oa/kqsm", fujian); GridViewBind(); } else { dr.Close(); } } else { mydb.Alert_Close("此记录不存在,可能已被删除!"); } } }
protected void Page_Load(object sender, EventArgs e) { //Session判断 hkdb.VeriSess("4"); if (!IsPostBack) { //模块权限 hkdb.PassTo("11712", "0"); //参数判断 if (!string.IsNullOrEmpty(Request.QueryString["id"])) { SqlDataReader datar = SqlHelper.ExecuteReader("SELECT A.*,B.QY_QC,C.ROLE_NAME,D.ZWMC,E.BM_MC,F.* FROM YH A LEFT OUTER JOIN QY B ON(A.UI_SSGS=B.QY_ID) LEFT OUTER JOIN JS C ON(A.UI_ROLE=C.ROLE_ID) LEFT OUTER JOIN ZW D ON(UI_ZW=D.ZWID) LEFT OUTER JOIN BM E ON(A.UI_SSBM=E.BM_ID) LEFT OUTER JOIN OA_KQ_QX F ON(A.UI_ID=F.YHID) WHERE A.UI_ID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'"); if (datar.Read()) { lblssgs.Text = datar["qy_qc"].ToString(); lblyhbm.Text = datar["ui_id"].ToString(); lblxm.Text = datar["ui_desc"].ToString(); lbljs.Text = datar["role_name"].ToString(); lblzt.Text = datar["ui_status"].ToString(); lblzw.Text = datar["zwmc"].ToString(); lblbm.Text = datar["bm_mc"].ToString(); kqid.Text = datar["kqid"].ToString(); ui_rzrq.Text = hkdb.GetDate(datar["ui_rzrq"].ToString()); kqspry1.Checked = hkdb.GetValueChk_Checked(datar["kqspry1"].ToString()); kqspry2.Checked = hkdb.GetValueChk_Checked(datar["kqspry2"].ToString()); kqspry3.Checked = hkdb.GetValueChk_Checked(datar["kqspry3"].ToString()); kqglry.Checked = hkdb.GetValueChk_Checked(datar["kqglry"].ToString()); tskqry.Checked = hkdb.GetValueChk_Checked(datar["tskqry"].ToString()); ynnjtj.Checked = hkdb.GetValueChk_Checked(datar["ynnjtj"].ToString()); datar.Close(); } else { datar.Close(); mydb.Alert_Close("此记录不存在,可能已被删除!"); } } } }
protected void Page_Load(object sender, EventArgs e) { hkdb.VeriSess("4"); if (!IsPostBack) { hkdb.PassTo("11714", "0"); //短信 dxtz.Visible = Convert.ToBoolean(hkdb.VeriSms()); //附件 SqlDataReader dr_fj = SqlHelper.ExecuteReader("SELECT p_string FROM hk_CSDA WHERE paramt='P_AttType'"); if (dr_fj.Read()) { attKey = dr_fj["p_string"].ToString(); } dr_fj.Close(); BindAttr(); Random g = new Random(); string rad = g.Next(10000).ToString(); Number.Text = "" + System.DateTime.Now.Year.ToString() + "" + System.DateTime.Now.Month.ToString() + "" + System.DateTime.Now.Day.ToString() + "" + System.DateTime.Now.Hour.ToString() + "" + System.DateTime.Now.Minute.ToString() + "" + System.DateTime.Now.Second.ToString() + "" + System.DateTime.Now.Millisecond.ToString() + "" + rad + ""; DropDownListBind(); SqlDataReader dr = SqlHelper.ExecuteReader("SELECT A.* FROM OA_KQ_SM01 A WHERE SID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'"); if (dr.Read()) { qdsj.Text = hkdb.GetDate(dr["qdsj"].ToString()); ynqd1.Checked = hkdb.GetValueChk_Checked(dr["ynqd1"].ToString()); ynqt1.Checked = hkdb.GetValueChk_Checked(dr["ynqt1"].ToString()); ynqd2.Checked = hkdb.GetValueChk_Checked(dr["ynqd2"].ToString()); ynqt2.Checked = hkdb.GetValueChk_Checked(dr["ynqt2"].ToString()); ynqd3.Checked = hkdb.GetValueChk_Checked(dr["ynqd3"].ToString()); ynqt3.Checked = hkdb.GetValueChk_Checked(dr["ynqt3"].ToString()); smzt.Text = dr["smzt"].ToString(); kqqksm.Text = dr["kqqksm"].ToString(); lblspr.Text = dr["jsrNames"].ToString(); lblsssj.Text = dr["sssj"].ToString(); jsr.SelectedValue = dr["jsrIDs"].ToString(); if (!string.IsNullOrEmpty(dr["smfj"].ToString())) { Number.Text = dr["smfj"].ToString(); } lblsscs.Text = dr["sscs"].ToString(); dr.Close(); } else { dr.Close(); mydb.Alert_Close("该考勤说明可能已被删除!"); } switch (smzt.Text) { case "录入": DelJhBtn.Visible = true; SendBtn.Visible = true; SaveBtn.Visible = true; p_jsr.Visible = true; AttDelBtn.Visible = true; uploadBtn.Visible = true; break; case "已退回": DelJhBtn.Visible = true; SendBtn.Visible = true; SaveBtn.Visible = true; p_jsr.Visible = true; AttDelBtn.Visible = true; uploadBtn.Visible = true; break; default: SendBtn.Visible = true; SaveBtn.Visible = true; p_jsr.Visible = true; AttDelBtn.Visible = true; uploadBtn.Visible = true; break; } //考勤审批说明 Kqspsm(); GridViewBind(); } BindDpList(); }
protected void Page_Load(object sender, EventArgs e) { hkdb.VeriSess("4"); if (!IsPostBack) { hkdb.PassTo("11717", "0"); //短信 dxtz.Visible = Convert.ToBoolean(hkdb.VeriSms()); if (!string.IsNullOrEmpty(Request.QueryString["id"])) { SqlDataReader dr = SqlHelper.ExecuteReader("SELECT A.* FROM OA_KQ_SM01 A WHERE SID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "' AND CHARINDEX('" + this.Session["userid"] + "',jsrIDs)>0 AND SMZT='送审中'"); if (dr.Read()) { lblqdsj.Text = hkdb.GetDate(dr["qdsj"].ToString()); ynqd1.Checked = hkdb.GetValueChk_Checked(dr["ynqd1"].ToString()); ynqt1.Checked = hkdb.GetValueChk_Checked(dr["ynqt1"].ToString()); ynqd2.Checked = hkdb.GetValueChk_Checked(dr["ynqd2"].ToString()); ynqt2.Checked = hkdb.GetValueChk_Checked(dr["ynqt2"].ToString()); ynqd3.Checked = hkdb.GetValueChk_Checked(dr["ynqd3"].ToString()); ynqt3.Checked = hkdb.GetValueChk_Checked(dr["ynqt3"].ToString()); smzt.Text = dr["smzt"].ToString(); lblkqqksm.Text = dr["kqqksm"].ToString(); lblsqr.Text = dr["sqrmc"].ToString(); sssj.Text = dr["sssj"].ToString(); lblspr.Text = dr["jsrNames"].ToString(); lblsqbmid.Text = dr["sqbmid"].ToString(); lblsqbmmc.Text = dr["sqbmmc"].ToString(); lblsqsj.Text = dr["sqsj"].ToString(); Number.Text = dr["smfj"].ToString(); lblsscs.Text = dr["sscs"].ToString(); dr.Close(); DropDownListBind(); //考勤审批说明 Kqspsm(); bd.GetAtt(Number.Text, "o3", "oa/kqsm", fujian); GridViewBind(); //判断是否分管领导或中心领导,如果是则默认选中为“转给考勤管理员” SqlDataReader dr0 = SqlHelper.ExecuteReader("SELECT * FROM OA_KQ_QX WHERE YHID='" + this.Session["UserID"] + "' AND (KQSPRY2='是' OR KQSPRY3='是')"); if (dr0.Read()) { jsr.SelectedValue = "jdqr"; kqry.Visible = true; kqry.Items.Clear(); string Str = " WHERE Z.KQGLRY='是'"; //考勤管理人员 string sql_kqry = "SELECT UI_ID,UI_DESC+'('+B.BM_MC+'-'+C.ZWMC+')' AS UI_DESC FROM OA_KQ_QX Z LEFT OUTER JOIN YH A ON(Z.YHID=A.UI_ID) LEFT OUTER JOIN BM B ON (A.UI_SSBM=B.BM_ID) LEFT OUTER JOIN ZW C ON(A.UI_ZW=C.ZWID) " + Str + " ORDER BY UI_DESC"; bd.Bind_DropDownList_NoBlank(kqry, sql_kqry, "UI_ID", "UI_DESC", "", ""); } dr0.Close(); //PrnLbl.Attributes.Add("onclick", "Javascript:popPrn('Xydcx_View_Prn.aspx?xydid=" + xydidstr.Text + "');"); } else { dr.Close(); mydb.Alert_Close("此记录已审批完成,无需再审!"); } } else { mydb.Alert_Close("此记录不存在,可能已被删除!"); } } }
protected void Page_Load(object sender, EventArgs e) { //Session判断 hkdb.VeriSess("4"); if (!IsPostBack) { //模块权限 hkdb.PassTo("60305", "0"); //dp绑定 DropDownListBind(); //公司判断 if (this.Session["qyid"].ToString() != "001") { ssgs.SelectedValue = this.Session["qyid"].ToString(); ssgs.Enabled = false; } //参数判断 if (!string.IsNullOrEmpty(Request.QueryString["id"])) { SqlDataReader datar = SqlHelper.ExecuteReader("SELECT * FROM YH WHERE UI_ID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'"); if (datar.Read()) { yhbm.Text = datar["ui_id"].ToString(); xm.Text = datar["ui_desc"].ToString(); gwjs.SelectedValue = datar["ui_role"].ToString(); xb.SelectedValue = datar["ui_sex"].ToString(); zt.SelectedValue = datar["ui_status"].ToString(); bz.Text = datar["ui_comm"].ToString(); zwmc.SelectedValue = datar["ui_zw"].ToString(); bm.SelectedValue = datar["ui_ssbm"].ToString(); bgdh.Text = datar["ui_bgdh"].ToString(); yddh.Text = datar["ui_yddh"].ToString(); czdh.Text = datar["ui_czdh"].ToString(); mail.Text = datar["ui_mail"].ToString(); txtSdate.Text = string.Format("{0:d}", datar["ui_sdate"]); txtEdate.Text = string.Format("{0:d}", datar["ui_edate"]); csrq.Text = hkdb.GetDate(datar["ui_csrq"].ToString()); ssgs.SelectedValue = datar["ui_ssgs"].ToString(); ynbmglz.Checked = hkdb.GetValueChk_Checked(datar["yn_bmglz"].ToString()); fjNumber.Text = datar["photo"].ToString(); datar.Close(); //子公司用户不允许删除、修改总部或其它子公司的信息 if (this.Session["qyid"].ToString() != "001" && this.Session["qyid"].ToString() != ssgs.SelectedValue) { DelBtn.Visible = false; SaveBtn.Visible = false; } else { //操作权限 OperQx(); } if (Request.QueryString["id"].ToString() == "admin") { gwjs.Enabled = false; txtSdate.Enabled = false; txtEdate.Enabled = false; zt.Enabled = false; DelBtn.Enabled = false; mydb.Alert("为避免误操作,系统将不允许删除或修改【admin】用户的角色、日期和状态属性!"); } } else { datar.Close(); mydb.Alert_Close("该用户编码不存在,可能已被删除!"); } } } }
protected void Page_Load(object Sender, EventArgs E) { hkdb.VeriSess("4"); if (!IsPostBack) { hkdb.PassTo("81105", "0"); //附件 attKey = this.Session["fjlx"].ToString(); BindAttr(); Random g = new Random(); string rad = g.Next(10000).ToString(); Number.Text = "" + System.DateTime.Now.Year.ToString() + "" + System.DateTime.Now.Month.ToString() + "" + System.DateTime.Now.Day.ToString() + "" + System.DateTime.Now.Hour.ToString() + "" + System.DateTime.Now.Minute.ToString() + "" + System.DateTime.Now.Second.ToString() + "" + System.DateTime.Now.Millisecond.ToString() + "" + rad + ""; if (!string.IsNullOrEmpty(Request.QueryString["id"])) { lbltitle.Text = "修改"; if (!string.IsNullOrEmpty(Request.QueryString["id"])) { SqlDataReader datar = SqlHelper.ExecuteReader("SELECT * FROM HR_Kpdf_Kpxm01 WHERE KPID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'"); if (datar.Read()) { kpid.Text = datar["kpid"].ToString(); kpqs.Text = datar["kpqs"].ToString(); ksrq.Text = hkdb.GetDate(datar["ksrq"].ToString()); jzrq.Text = hkdb.GetDate(datar["jzrq"].ToString()); kpzt.Text = datar["kpzt"].ToString(); UserID.Text = datar["CypwIDs"].ToString(); UserName.Text = datar["CypwNames"].ToString(); bz.Text = datar["kpbz"].ToString(); if (!string.IsNullOrEmpty(datar["xmfj"].ToString())) { Number.Text = datar["xmfj"].ToString(); } datar.Close(); //Init switch (kpzt.Text) { case "未生效": SaveBtn.Visible = true; DelBtn.Visible = true; StartBtn.Visible = true; AttDelBtn.Visible = true; uploadBtn.Visible = true; break; case "已生效": StopBtn.Visible = true; break; case "已暂停": StartBtn.Visible = true; ResetBtn.Visible = true; break; case "已结束": break; } ksrq.Enabled = false; jzrq.Enabled = false; } else { datar.Close(); mydb.Alert_Close("此记录不存在,可能已被删除!"); } } } else { lbltitle.Text = "新增"; kpzt.Text = "未生效"; SaveBtn.Visible = true; } } BindDpList(); }
protected void Page_Load(object sender, EventArgs e) { hkdb.VeriSess("4"); if (!IsPostBack) { hkdb.PassTo("11714", "0"); //短信 dxtz.Visible = Convert.ToBoolean(hkdb.VeriSms()); //附件 SqlDataReader dr_fj = SqlHelper.ExecuteReader("SELECT p_string FROM hk_CSDA WHERE paramt='P_AttType'"); if (dr_fj.Read()) { attKey = dr_fj["p_string"].ToString(); } dr_fj.Close(); BindAttr(); Random g = new Random(); string rad = g.Next(10000).ToString(); Number.Text = "" + System.DateTime.Now.Year.ToString() + "" + System.DateTime.Now.Month.ToString() + "" + System.DateTime.Now.Day.ToString() + "" + System.DateTime.Now.Hour.ToString() + "" + System.DateTime.Now.Minute.ToString() + "" + System.DateTime.Now.Second.ToString() + "" + System.DateTime.Now.Millisecond.ToString() + "" + rad + ""; DropDownListBind(); SqlDataReader dr = SqlHelper.ExecuteReader("SELECT A.* FROM OA_KQ_QJD01 A WHERE QID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'"); if (dr.Read()) { qjlx.SelectedValue = dr["qjlx"].ToString(); gjlb.SelectedValue = dr["gjlb"].ToString(); qjkssj.Text = hkdb.GetDate(dr["qjkssj"].ToString()); qjkssd.SelectedValue = dr["qjkssd"].ToString(); qjjssj.Text = hkdb.GetDate(dr["qjjssj"].ToString()); qjjssd.SelectedValue = dr["qjjssd"].ToString(); qjts.Text = dr["qjts"].ToString(); qjzt.Text = dr["qjzt"].ToString(); qjly.Text = dr["qjly"].ToString(); gztzqk.Text = dr["gztzqk"].ToString(); lblspr.Text = dr["jsrNames"].ToString(); lblsssj.Text = dr["sssj"].ToString(); jsr.SelectedValue = dr["jsrIDs"].ToString(); if (!string.IsNullOrEmpty(dr["qjfj"].ToString())) { Number.Text = dr["qjfj"].ToString(); } dr.Close(); if (qjlx.SelectedValue == "公假") { lblgjlb.Visible = true; gjlb.Visible = true; } } else { dr.Close(); mydb.Alert_Close("此记录不存在,可能已被删除!"); } switch (qjzt.Text) { case "录入": DelJhBtn.Visible = true; SendBtn.Visible = true; SaveBtn.Visible = true; p_jsr.Visible = true; AttDelBtn.Visible = true; uploadBtn.Visible = true; break; case "已退回": DelJhBtn.Visible = true; SendBtn.Visible = true; SaveBtn.Visible = true; p_jsr.Visible = true; AttDelBtn.Visible = true; uploadBtn.Visible = true; break; default: break; } //考勤审批说明 Kqspsm(); GridViewBind(); } BindDpList(); }