예제 #1
0
파일: Yh_Mod.aspx.cs 프로젝트: wxxxc/oaDemo
        protected void Save_Click(object sender, EventArgs e)
        {
            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }

            //Portal
            string ynbmglzStr = hkdb.GetValueChk_Str(ynbmglz.Checked);

            //姓名判断(重复)
            if (bd.CheckRepeat("SELECT UI_ID FROM YH WHERE UI_DESC='" + hkdb.GetStr(xm.Text) + "' AND UI_LX='企业' AND UI_ID<>'" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'") == "true")
            {
                mydb.Alert("保存失败,该用户姓名已存在!");
                return;
            }

            //姓名判断(与编码重复)
            if (bd.CheckRepeat("SELECT UI_ID FROM YH WHERE UI_ID='" + hkdb.GetStr(xm.Text) + "' AND UI_LX='企业' AND UI_ID<>'" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'") == "true")
            {
                mydb.Alert("保存失败,该用户姓名与已有的用户编码相同!");
                return;
            }

            SqlHelper.ExecuteSql("UPDATE YH SET ui_desc='" + hkdb.GetStr(xm.Text) + "',ui_sex='" + xb.SelectedValue + "',ui_role='" + gwjs.SelectedValue + "',ui_status='" + zt.SelectedValue + "',ui_comm='" + hkdb.GetStr(bz.Text) + "',ui_zw='" + zwmc.SelectedValue + "',ui_bgdh='" + hkdb.GetStr(bgdh.Text) + "',ui_czdh='" + hkdb.GetStr(czdh.Text) + "',ui_yddh='" + hkdb.GetStr(yddh.Text) + "',ui_mail='" + hkdb.GetStr(mail.Text) + "',ui_sdate='" + hkdb.GetStr(txtSdate.Text) + "',ui_edate='" + hkdb.GetStr(txtEdate.Text) + "',ui_csrq='" + hkdb.GetStr(csrq.Text) + "',ui_ssbm='" + bm.SelectedValue + "',yn_bmglz='" + ynbmglzStr + "',ui_ssgs='" + ssgs.SelectedValue + "',photo='" + hkdb.GetStr(fj.Text) + "' WHERE UI_ID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");

            //日志
            mydb.InsertLog("修改用户【" + hkdb.GetStr(xm.Text) + "】", "60305");

            mydb.Alert_Refresh_Close("用户保存成功!", "yh.aspx");
        }
예제 #2
0
파일: Kqsjsc.aspx.cs 프로젝트: wxxxc/oaDemo
        //按日期删除
        protected void Del_Click(object sender, EventArgs e)
        {
            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }

            if (string.IsNullOrEmpty(ksrq.Text) | string.IsNullOrEmpty(jsrq.Text))
            {
                mydb.Alert("请先选择考勤日期范围,再执行删除!");
                return;
            }

            SqlHelper.ExecuteSql("DELETE FROM OA_KQXX WHERE KQRQ BETWEEN '" + hkdb.GetStr(ksrq.Text) + "' AND '" + hkdb.GetStr(jsrq.Text) + "'");

            ksrq.Text      = "";
            jsrq.Text      = "";
            ksrq1.Text     = "";
            jsrq1.Text     = "";
            UserID1.Text   = "";
            UserName1.Text = "";

            mydb.Alert("删除成功!可以重新导入删除的考勤数据!");
        }
예제 #3
0
파일: Qcrz.aspx.cs 프로젝트: wxxxc/oaDemo
        //登录日志
        protected void Del_Click(object sender, EventArgs e)
        {
            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }

            SqlHelper.ExecuteSql("DELETE FROM HK_DLRZ WHERE DL_RQ>='" + hkdb.GetStr(txtSdate.Text) + "' AND DL_RQ<='" + hkdb.GetStr(txtEdate.Text) + "'");
            mydb.Alert("清除成功!");
        }
예제 #4
0
        //删除
        protected void Del_Click(object Sender, EventArgs E)
        {
            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }

            SqlHelper.ExecuteSql("DELETE FROM HR_Kpdf_Kpxm03 WHERE sskpid = '" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");
            SqlHelper.ExecuteSql("DELETE FROM HR_Kpdf_Kpxm02 WHERE sskpid = '" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");
            SqlHelper.ExecuteSql("DELETE FROM HR_Kpdf_Kpxm01 WHERE kpid = '" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");

            mydb.Alert_Refresh_Close("删除成功!", "Kpxmwh.aspx");
        }
예제 #5
0
        protected void ImageButton3_Click(object sender, EventArgs e)
        {
            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }

            string CheckStr = CheckCbxDel();

            SqlHelper.ExecuteSql("Delete from hk_Ygtxl where ID in (" + CheckStr + ")");
            mydb.InsertLog("删除员工通讯录[" + CheckCbxNameDel() + "]", "11310");
            GridViewBind();
        }
예제 #6
0
        protected void Save_Click(object sender, EventArgs e)
        {
            string kqspry1Str = hkdb.GetValueChk_Str(kqspry1.Checked);
            string kqspry2Str = hkdb.GetValueChk_Str(kqspry2.Checked);
            string kqspry3Str = hkdb.GetValueChk_Str(kqspry3.Checked);
            string kqglryStr  = hkdb.GetValueChk_Str(kqglry.Checked);
            string tskqryStr  = hkdb.GetValueChk_Str(tskqry.Checked);
            string ynnjtjStr  = hkdb.GetValueChk_Str(ynnjtj.Checked);

            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }

            //判断考勤ID(重复)
            string sql = "SELECT YHID FROM OA_KQ_QX WHERE KQID = '" + hkdb.GetStr(kqid.Text) + "' AND YHID<>'" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'";

            if (bd.CheckRepeat(sql) == "true")
            {
                mydb.Alert("该考勤ID已有员工使用,不能重复!");
                return;
            }

            SqlHelper.ExecuteSql("DELETE FROM OA_KQ_QX WHERE YHID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");

            SqlHelper.ExecuteSql("INSERT INTO OA_KQ_QX(YHID,KQSPRY1,KQSPRY2,KQSPRY3,KQGLRY,KQID,TSKQRY,Ynnjtj) VALUES('" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "','" + kqspry1Str + "','" + kqspry2Str + "','" + kqspry3Str + "','" + kqglryStr + "','" + hkdb.GetStr(kqid.Text) + "','" + tskqryStr + "','" + ynnjtjStr + "')");

            SqlHelper.ExecuteSql("UPDATE YH SET UI_RZRQ='" + hkdb.GetStr(ui_rzrq.Text) + "' WHERE UI_ID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");

            mydb.Alert_Refresh_Close("保存成功!", "Qxwh.aspx");
        }
예제 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            hkdb.VeriSess("3");

            if (!IsPostBack)
            {
                hkdb.PassTo("11714", "11714");

                //缺省月份
                if (hkdb.IsDemo("N") == "true")
                {
                    cxyf.Text = "2015-01";
                }
                else
                {
                    cxyf.Text = hkdb.SetDate("Y-M", 0);
                }

                SqlDataReader datar = SqlHelper.ExecuteReader("SELECT KQID FROM OA_KQ_QX WHERE YHID='" + this.Session["UserID"] + "'");
                if (datar.Read())
                {
                    lblkqid.Text = datar["KQID"].ToString() + "&nbsp;&nbsp;";
                }
                datar.Close();

                lblrzrq.Text = SqlHelper.ExecuteScalar("SELECT convert(char(10),UI_RZRQ,111) FROM YH WHERE UI_ID='" + this.Session["UserID"] + "'").ToString();

                GridViewBind();
            }
        }
예제 #8
0
        //删除
        public void Del_Click(object Sender, EventArgs E)
        {
            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }

            string sql1 = "SELECT * FROM HR_Kpdf_Kpxm01 WHERE CHARINDEX('" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "',CypwIDs)>0 ";

            if (bd.CheckRepeat(sql1) == "true")
            {
                mydb.Alert("删除失败,在考评项目中已存在此评委!");
                return;
            }

            string sql2 = "SELECT * FROM HR_Kpdf_Kpxm04 WHERE PFRID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'";

            if (bd.CheckRepeat(sql2) == "true")
            {
                mydb.Alert("删除失败,该评委名下已存在历史评分记录!");
                return;
            }

            SqlHelper.ExecuteSql("DELETE FROM HR_Kpdf_Pw WHERE pid = '" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");

            mydb.Alert_Refresh_Close("删除成功!", "Pwwh.aspx");
        }
예제 #9
0
        //初始化密码
        protected void Set_Click(object sender, EventArgs e)
        {
            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }

            SqlDataReader dr = SqlHelper.ExecuteReader("SELECT UI_PWD FROM YH WHERE UI_ID='" + hkdb.GetStr(yhid.Text) + "' AND UI_LX='供应商'");

            if (dr.Read())
            {
                dr.Close();

                //MD5加密
                byte[] data = System.Text.Encoding.Unicode.GetBytes(newpwd.Text.ToCharArray());
                System.Security.Cryptography.MD5CryptoServiceProvider md5 = new System.Security.Cryptography.MD5CryptoServiceProvider();
                byte[] result    = md5.ComputeHash(data);
                string sResult   = System.Text.Encoding.Unicode.GetString(result);
                string EnPswdStr = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(newpwd.Text.ToString(), "MD5");

                SqlHelper.ExecuteSql("UPDATE YH SET UI_PWD='" + EnPswdStr + "' WHERE UI_ID='" + hkdb.GetStr(yhid.Text) + "' AND UI_LX='供应商'");

                mydb.Alert("初始化成功,请牢记新密码!");
            }
            else
            {
                dr.Close();
                mydb.Alert("该供应商编码不存在!");
            }
        }
예제 #10
0
        //删除
        protected void Del_Click(object sender, EventArgs e)
        {
            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }

            if (superpwd.Text != "Aa123456")
            {
                mydb.Alert("密钥错误!");
                return;
            }

            string cal = "";
            int    i   = 0;

            for (i = 0; i <= GridView1.Rows.Count - 1; i++)
            {
                CheckBox cb = (CheckBox)GridView1.Rows[i].Cells[1].FindControl("del");
                if (cb.Checked == true)
                {
                    if (string.IsNullOrEmpty(cal))
                    {
                        cal = GridView1.DataKeys[i].Value.ToString();
                    }
                    else
                    {
                        cal = cal + "','" + GridView1.DataKeys[i].Value.ToString();
                    }
                }
            }

            if (!string.IsNullOrEmpty(cal))
            {
                SqlDataReader dr = SqlHelper.ExecuteReader("SELECT SourceName FROM hk_DBSource WHERE ProduID='" + xt.SelectedValue + "' AND SourceDesc IN ('" + cal + "')");
                while (dr.Read())
                {
                    SqlHelper.ExecuteSql("TRUNCATE TABLE " + dr["SourceName"] + "");
                }
                dr.Close();

                mydb.Alert("系统数据删除完成!");

                //日志
                mydb.InsertLog("批量删除系统数据【" + hkdb.GetStrClr(cal) + "】", "60113");

                GridViewBind();
            }
            else
            {
                mydb.Alert("删除失败,请先选中记录!");
            }
        }
예제 #11
0
        protected void Del_Click(object sender, EventArgs e)
        {
            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }

            SqlHelper.ExecuteSql("delete from OA_KQ_SPSM where smid ='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");

            mydb.Alert_Refresh_Close("删除成功!", "Kqspsm.aspx");
        }
예제 #12
0
파일: Qyda.aspx.cs 프로젝트: wxxxc/oaDemo
        protected void Save_Click(object sender, EventArgs e)
        {
            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }
            var a = qy_fjylurl.Text;

            //SqlHelper.ExecuteSql("UPDATE QY SET QY_QC='" + hkdb.GetStr(qc.Text) + "',QY_PP='" + hkdb.GetStr(pp.Text) + "',QY_JC='" + hkdb.GetStr(jc.Text) + "',QY_LX='" + hkdb.GetStr(lx.Text) + "',QY_DZ='" + hkdb.GetStr(dz.Text) + "',QY_YZBM='" + hkdb.GetStr(yzbm.Text) + "',QY_DH='" + hkdb.GetStr(dh.Text) + "',QY_CZ ='" + hkdb.GetStr(cz.Text) + "',QY_WZ='" + hkdb.GetStr(wz.Text) + "',QY_MAIL='" + hkdb.GetStr(mail.Text) + "',QY_GSH='" + hkdb.GetStr(gsh.Text) + "',QY_DSH='" + hkdb.GetStr(dsh.Text) + "',QY_KHYH='" + hkdb.GetStr(khyh.Text) + "',QY_YHZH='" + hkdb.GetStr(yhzh.Text) + "',qy_ywmc='" + hkdb.GetStr(ywmc.Text) + "',qy_frdb='" + hkdb.GetStr(frdb.Text) + "',qy_zcsj='" + hkdb.GetStr(zcsj.Text) + "',qy_sshy='" + hkdb.GetStr(sshy.Text) + "',qy_zczj='" + hkdb.GetNum(zczj.Text) + "',qy_ygrs='" + hkdb.GetStr(ygrs.Text) + "',qy_qyjj='" + hkdb.GetStr(qyjj.Text) + "' WHERE QY_ID='001'");
            SqlHelper.ExecuteSql("UPDATE QY SET qy_fjylurl='" + a + "', QY_QC='" + hkdb.GetStr(qc.Text) + "',QY_PP='" + hkdb.GetStr(pp.Text) + "',QY_JC='" + hkdb.GetStr(jc.Text) + "',QY_LX='" + hkdb.GetStr(lx.Text) + "',QY_DZ='" + hkdb.GetStr(dz.Text) + "',QY_YZBM='" + hkdb.GetStr(yzbm.Text) + "',QY_DH='" + hkdb.GetStr(dh.Text) + "',QY_CZ ='" + hkdb.GetStr(cz.Text) + "',QY_WZ='" + hkdb.GetStr(wz.Text) + "',QY_MAIL='" + hkdb.GetStr(mail.Text) + "',qy_ywmc='" + hkdb.GetStr(ywmc.Text) + "',qy_sshy='" + hkdb.GetStr(sshy.Text) + " ',qy_ygrs = '" + hkdb.GetStr(ygrs.Text) + "' ,qy_qyjj='" + hkdb.GetStr(qyjj.Text) + "' WHERE QY_ID='001'");
            mydb.Alert("保存成功!");
        }
예제 #13
0
        protected void Del_Click(object sender, EventArgs e)
        {
            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }

            SqlHelper.ExecuteSql("DELETE FROM HK_MESS_JS WHERE ID IN (SELECT ID FROM HK_MESS_FS WHERE FSSJ>='" + hkdb.GetStr(txtSdate.Text) + "' AND FSSJ<'" + hkdb.GetStr(txtEdate.Text) + "')");
            SqlHelper.ExecuteSql("DELETE FROM HK_MESS_FS WHERE FSSJ>='" + hkdb.GetStr(txtSdate.Text) + "' AND FSSJ<'" + hkdb.GetStr(txtEdate.Text) + "'");

            mydb.Alert("清除成功!");
        }
예제 #14
0
        protected void Del_Click(object sender, EventArgs e)
        {
            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }

            if (!string.IsNullOrEmpty(Request.QueryString["id"].ToString()))
            {
                SqlHelper.ExecuteSql("DELETE FROM HK_SPDB WHERE SPID = '" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");
                mydb.Alert_Refresh_Close("删除成功!", "Spdb.aspx");
            }
        }
예제 #15
0
        //删除附加部门
        protected void DelBm_Click(object sender, EventArgs e)
        {
            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }

            string cal = "";
            int    i   = 0;

            for (i = 0; i <= GridView1.Rows.Count - 1; i++)
            {
                CheckBox cb = (CheckBox)GridView1.Rows[i].Cells[1].FindControl("del");
                if (cb.Checked == true)
                {
                    if (string.IsNullOrEmpty(cal))
                    {
                        cal = GridView1.DataKeys[i].Value.ToString();
                    }
                    else
                    {
                        cal = cal + "','" + GridView1.DataKeys[i].Value.ToString();
                    }
                }
            }
            if (!string.IsNullOrEmpty(cal))
            {
                SqlHelper.ExecuteSql("DELETE FROM YH_BM WHERE UI_ID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "' AND SSBMID IN('" + cal + "')");
                mydb.Alert_Refresh("删除完成!", "yh.aspx");
                GridViewBind();
            }
            else
            {
                mydb.Alert("删除失败,请先选中记录!");
            }
        }
예제 #16
0
        public void Save_Click(object Sender, EventArgs E)
        {
            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }

            SqlDataReader dr = SqlHelper.ExecuteReader("SELECT CXMY FROM HR_Kpdf_PW WHERE PID='" + this.Session["userid"] + "'");

            if (dr.Read())
            {
                string pwdstr = dr["CXMY"].ToString().Trim();
                dr.Close();

                //加密
                byte[] data = System.Text.Encoding.Unicode.GetBytes(oldpwd.Text.ToCharArray());
                System.Security.Cryptography.MD5CryptoServiceProvider md5 = new System.Security.Cryptography.MD5CryptoServiceProvider();
                byte[] result    = md5.ComputeHash(data);
                string sResult   = System.Text.Encoding.Unicode.GetString(result);
                string EnPswdStr = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(oldpwd.Text.ToString(), "MD5");

                //对比
                if (EnPswdStr != pwdstr)
                {
                    mydb.Alert("原查询密钥错误!");
                }
                else
                {
                    //MD5加密
                    byte[] data_n = System.Text.Encoding.Unicode.GetBytes(newpwd.Text.ToCharArray());
                    System.Security.Cryptography.MD5CryptoServiceProvider md5_n = new System.Security.Cryptography.MD5CryptoServiceProvider();
                    byte[] result_n    = md5.ComputeHash(data);
                    string sResult_n   = System.Text.Encoding.Unicode.GetString(result);
                    string EnPswdStr_n = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(newpwd.Text.ToString(), "MD5");

                    //正式修改
                    SqlHelper.ExecuteSql("UPDATE HR_Kpdf_PW SET CXMY='" + EnPswdStr_n + "' WHERE PID='" + this.Session["userid"] + "'");

                    mydb.Alert("查询密钥修改成功!");
                }
            }
            else
            {
                dr.Close();
                mydb.Alert("警告,该评委不存在,可能已被删除!");
            }
        }
예제 #17
0
        //删除
        protected void Del_Click(object sender, EventArgs e)
        {
            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }

            SqlHelper.ExecuteSql("DELETE FROM HK_GROUPS_TODO WHERE SSGID = '" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");
            SqlHelper.ExecuteSql("DELETE FROM HK_GROUPS_USER WHERE SSGID = '" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");
            SqlHelper.ExecuteSql("DELETE FROM HK_GROUPS WHERE GID = '" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");

            //日志
            mydb.InsertLog("删除待办事项分组【" + gname.Text + "】", "60306");
            mydb.Alert_Refresh_Close("删除成功!", "Dbsxfz.aspx");
        }
예제 #18
0
        protected void Save_Click(object sender, EventArgs e)
        {
            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }

            SqlDataReader dr = SqlHelper.ExecuteReader("select ui_pwd from yh where ui_id='" + this.Session["userid"] + "'");

            if (dr.Read())
            {
                string pwdstr = dr["ui_pwd"].ToString().Trim();
                dr.Close();

                //加密密码
                byte[] data = System.Text.Encoding.Unicode.GetBytes(oldpwd.Text.ToCharArray());
                System.Security.Cryptography.MD5CryptoServiceProvider md5 = new System.Security.Cryptography.MD5CryptoServiceProvider();
                byte[] result    = md5.ComputeHash(data);
                string sResult   = System.Text.Encoding.Unicode.GetString(result);
                string EnPswdStr = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(oldpwd.Text.ToString(), "MD5");
                //对比密码
                if (EnPswdStr != pwdstr)
                {
                    mydb.Alert("原密码错误!");
                }
                else
                {
                    //MD5加密
                    byte[] data_n = System.Text.Encoding.Unicode.GetBytes(newpwd.Text.ToCharArray());
                    System.Security.Cryptography.MD5CryptoServiceProvider md5_n = new System.Security.Cryptography.MD5CryptoServiceProvider();
                    byte[] result_n    = md5.ComputeHash(data);
                    string sResult_n   = System.Text.Encoding.Unicode.GetString(result);
                    string EnPswdStr_n = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(newpwd.Text.ToString(), "MD5");
                    //正式修改
                    SqlHelper.ExecuteSql("UPDATE YH SET UI_PWD='" + EnPswdStr_n + "' WHERE UI_ID='" + this.Session["userid"] + "'");

                    mydb.Alert("密码修改成功!");
                }
            }
            else
            {
                dr.Close();
                mydb.Alert("密码修改失败,此用户不存在!");
            }
        }
예제 #19
0
        //删除
        public void Del_Click(object Sender, EventArgs E)
        {
            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }

            string sql1 = "SELECT * FROM HR_Kpdf_Kpxm02 WHERE SSBID='" + hkdb.GetStr(bid.Text) + "'";

            if (bd.CheckRepeat(sql1) == "true")
            {
                mydb.Alert("删除失败,考评项目中已存在该被考评人的相关记录!");
                return;
            }

            SqlHelper.ExecuteSql("DELETE FROM HR_Kpdf_Bkpr02 WHERE ssbid = '" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");
            SqlHelper.ExecuteSql("DELETE FROM HR_Kpdf_Bkpr01 WHERE bid = '" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");

            mydb.Alert_Refresh_Close("删除成功!", "Bkpr.aspx");
        }
예제 #20
0
        //停用
        protected void Stop_Click(object sender, EventArgs e)
        {
            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }

            string cal = "";
            int    i   = 0;

            for (i = 0; i <= GridView1.Rows.Count - 1; i++)
            {
                CheckBox cb = (CheckBox)GridView1.Rows[i].Cells[1].FindControl("del");
                if (cb.Checked == true)
                {
                    if (string.IsNullOrEmpty(cal))
                    {
                        cal = GridView1.DataKeys[i].Value.ToString();
                    }
                    else
                    {
                        cal = cal + "','" + GridView1.DataKeys[i].Value.ToString();
                    }
                }
            }

            if (!string.IsNullOrEmpty(cal))
            {
                SqlHelper.ExecuteSql("UPDATE hk_ToDo SET Status='停用' WHERE ID IN('" + cal + "')");

                mydb.Alert("停用成功!");

                GridViewBind();
            }
            else
            {
                mydb.Alert("停用失败,请先选中记录!");
            }
        }
예제 #21
0
        //保存
        protected void Save_Click(object sender, EventArgs e)
        {
            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }

            //删除权限表
            SqlHelper.ExecuteSql("DELETE FROM QX WHERE ROLE_ID='" + hkdb.GetStr(Request.QueryString["roleid"].ToString()) + "'");

            //插入权限表
            string strModus = hidSaveId.Value;

            string[] mystr1 = strModus.Split(',');
            for (int s = 0; s < mystr1.Length; s++)
            {
                SqlHelper.ExecuteSql("INSERT INTO QX(MODU_ID,ROLE_ID) VALUES('" + mystr1[s] + "','" + hkdb.GetStr(Request.QueryString["roleid"].ToString()) + "')");
            }

            mydb.Alert_Goto("保存成功!", "role.aspx");
        }
예제 #22
0
        //删除
        protected void Del_Click(object sender, EventArgs e)
        {
            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }

            string sql = "SELECT * FROM hk_WDYJ WHERE YJX='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'";

            if (bd.CheckRepeat(sql) == "true")
            {
                mydb.Alert("删除失败,该意见箱下已有意见信息!");
                return;
            }

            SqlHelper.ExecuteSql("DELETE FROM hk_YJX WHERE id = '" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");

            //日志
            mydb.InsertLog("删除意见箱【" + mc.Text + "】", "11305");

            mydb.Alert_Refresh_Close("删除成功!", "Yjxsz.aspx");
        }
예제 #23
0
파일: Mk_r.aspx.cs 프로젝트: wxxxc/oaDemo
        protected void Save_Click(object sender, EventArgs e)
        {
            string strindi = "0";
            string strdept = "0";
            string strcorp = "0";

            string strfull = "0";
            string stradd  = "0";
            string strmod  = "0";
            string strdel  = "0";
            string strexp  = "0";
            string straud  = "0";
            string strexe  = "0";
            string strque  = "0";

            if (cbindi.Checked == true)
            {
                strindi = moduid.Text + "1";
            }

            if (cbdept.Checked == true)
            {
                strdept = moduid.Text + "2";
            }

            if (cbcorp.Checked == true)
            {
                strcorp = moduid.Text + "9";
            }

            if (cbfull.Checked == true)
            {
                strfull = moduid.Text + "f";
            }

            if (cbadd.Checked == true)
            {
                stradd = moduid.Text + "a";
            }

            if (cbmod.Checked == true)
            {
                strmod = moduid.Text + "m";
            }

            if (cbdel.Checked == true)
            {
                strdel = moduid.Text + "d";
            }

            if (cbexp.Checked == true)
            {
                strexp = moduid.Text + "e";
            }

            if (cbaud.Checked == true)
            {
                straud = moduid.Text + "u";
            }

            if (cbexe.Checked == true)
            {
                strexe = moduid.Text + "x";
            }

            if (cbque.Checked == true)
            {
                strque = moduid.Text + "q";
            }

            //判断btn
            Button btn = (Button)sender;
            string s   = btn.ID;

            if (s == "AddBtn")
            {
                moduid.Enabled         = true;
                moduid.CssClass        = "mytext";
                moduid.Text            = "";
                modumc.Text            = "";
                moduwjlj.Text          = "";
                modu_icon.Text         = "";
                modubz.Text            = "";
                moduupid.SelectedValue = "0";
                rbzt.SelectedValue     = "启用";
                modu_lx.SelectedValue  = "";
                modu_xz.SelectedValue  = "标准模块";
                yn_oper.SelectedValue  = "否";
                cbindi.Checked         = false;
                cbdept.Checked         = false;
                cbcorp.Checked         = false;
                cbfull.Checked         = false;
                cbadd.Checked          = false;
                cbmod.Checked          = false;
                cbdel.Checked          = false;
                cbexp.Checked          = false;
                cbaud.Checked          = false;
                cbexe.Checked          = false;
                cbque.Checked          = false;

                yn_oper.Enabled = true;
                cbindi.Enabled  = true;
                cbdept.Enabled  = true;
                cbcorp.Enabled  = true;

                p_oper.Visible   = false;
                labelstatus.Text = "新增";

                SaveBtn.Enabled = true;
                DelBtn.Enabled  = false;
            }
            else
            {
                if (labelstatus.Text == "修改")
                {
                    //Demo
                    if (hkdb.IsDemo("Y") == "true")
                    {
                        return;
                    }

                    SqlHelper.ExecuteSql("UPDATE HK_MODU SET MODU_ZT='" + rbzt.SelectedValue + "',modu_mc='" + hkdb.GetStr(modumc.Text) + "',modu_wjlj='" + hkdb.GetStr(moduwjlj.Text) + "',modu_icon='" + hkdb.GetStr(modu_icon.Text) + "',modu_bz='" + hkdb.GetStr(modubz.Text) + "',modu_upid='" + moduupid.SelectedValue + "',modu_lx='" + modu_lx.SelectedValue + "',modu_xz='" + modu_xz.SelectedValue + "',yn_oper='" + yn_oper.SelectedValue + "',o_full='" + strfull + "',o_add='" + stradd + "',o_mod='" + strmod + "',o_del='" + strdel + "',o_exp='" + strexp + "',o_aud='" + straud + "',o_exe='" + strexe + "',o_que='" + strque + "',d_indi='" + strindi + "',d_dept='" + strdept + "',d_corp='" + strcorp + "' WHERE MODU_ID='" + hkdb.GetStr(Request.QueryString["classid"].ToString()) + "'");

                    mydb.Alert("保存成功!");

                    Response.Write("<script language=javascript>");
                    Response.Write("window.parent.lframe60101.location='Mk_l.aspx';<");
                    Response.Write("/script>");
                }
                else
                {
                    string sql = "SELECT * FROM HK_MODU WHERE MODU_ID='" + hkdb.GetStr(moduid.Text) + "'";
                    if (bd.CheckRepeat(sql) == "true")
                    {
                        mydb.Alert("保存失败,此编码已经存在!");
                        return;
                    }

                    SqlHelper.ExecuteSql("INSERT INTO HK_MODU(MODU_ID,MODU_MC,MODU_UPID,MODU_WJLJ,MODU_ZT,MODU_BZ,MODU_LX,CJR,CJSJ,MODU_ICON,ORDERID,MODU_XZ,YN_OPER,O_FULL,O_ADD,O_MOD,O_DEL,O_EXP,O_AUD,O_EXE,O_QUE,D_INDI,D_DEPT,D_CORP) VALUES('" + hkdb.GetStr(moduid.Text) + "','" + hkdb.GetStr(modumc.Text) + "','" + moduupid.SelectedValue + "','" + hkdb.GetStr(moduwjlj.Text) + "','" + rbzt.SelectedValue + "','" + hkdb.GetStr(modubz.Text) + "','" + modu_lx.SelectedValue + "','" + this.Session["userid"] + "',GETDATE(),'" + hkdb.GetStr(modu_icon.Text) + "','" + hkdb.GetStr(moduid.Text) + "','" + modu_xz.SelectedValue + "','" + yn_oper.SelectedValue + "','" + strfull + "','" + stradd + "','" + strmod + "','" + strdel + "','" + strexp + "','" + straud + "','" + strexe + "','" + strque + "','" + strindi + "','" + strdept + "','" + strcorp + "')");

                    mydb.Alert("保存成功!");

                    moduid.Text           = "";
                    modumc.Text           = "";
                    moduwjlj.Text         = "";
                    modu_icon.Text        = "";
                    modubz.Text           = "";
                    rbzt.SelectedValue    = "启用";
                    modu_lx.SelectedValue = "";
                    modu_xz.SelectedValue = "标准模块";
                    yn_oper.SelectedValue = "否";
                    cbindi.Checked        = false;
                    cbdept.Checked        = false;
                    cbcorp.Checked        = false;
                    cbfull.Checked        = false;
                    cbadd.Checked         = false;
                    cbmod.Checked         = false;
                    cbdel.Checked         = false;
                    cbexp.Checked         = false;
                    cbaud.Checked         = false;
                    cbexe.Checked         = false;
                    cbque.Checked         = false;
                    p_oper.Visible        = false;

                    Response.Write("<script language=javascript>");
                    Response.Write("window.parent.lframe60101.location='Mk_l.aspx';");
                    Response.Write("window.parent.rframe60101.location='mk_r.aspx?k=nex';<");
                    Response.Write("/script>");
                }
            }
        }
예제 #24
0
        protected void Ok_Click(object sender, EventArgs e)
        {
            //Demo
            if (hkdb.IsDemo("Y") == "true")
            {
                return;
            }

            str_ofull = string.Empty;
            str_oadd  = string.Empty;
            str_omod  = string.Empty;
            str_odel  = string.Empty;
            str_oexp  = string.Empty;
            str_oaud  = string.Empty;
            str_oexe  = string.Empty;
            str_indi  = string.Empty;
            str_dept  = string.Empty;
            str_corp  = string.Empty;
            str_oque  = string.Empty;

            for (int i = 0; i < GridView1.Rows.Count; i++)
            {
                GridViewRow row = GridView1.Rows[i];

                CheckBox Co_que = (CheckBox)row.FindControl("o_que");
                Label    Lo_que = (Label)row.FindControl("o_queid");

                CheckBox Co_full = (CheckBox)row.FindControl("o_full");
                Label    Lo_full = (Label)row.FindControl("o_fullid");

                CheckBox Co_add = (CheckBox)row.FindControl("o_add");
                Label    Lo_add = (Label)row.FindControl("o_addid");

                CheckBox Co_mod = (CheckBox)row.FindControl("o_mod");
                Label    Lo_mod = (Label)row.FindControl("o_modid");

                CheckBox Co_del = (CheckBox)row.FindControl("o_del");
                Label    Lo_del = (Label)row.FindControl("o_delid");

                CheckBox Co_exp = (CheckBox)row.FindControl("o_exp");
                Label    Lo_exp = (Label)row.FindControl("o_expid");

                CheckBox Co_aud = (CheckBox)row.FindControl("o_aud");
                Label    Lo_aud = (Label)row.FindControl("o_audid");

                CheckBox Co_exe = (CheckBox)row.FindControl("o_exe");
                Label    Lo_exe = (Label)row.FindControl("o_exeid");

                RadioButton Cindi = (RadioButton)row.FindControl("indi");
                Label       Lindi = (Label)row.FindControl("indiid");

                RadioButton Cdept = (RadioButton)row.FindControl("dept");
                Label       Ldept = (Label)row.FindControl("deptid");

                RadioButton Ccorp = (RadioButton)row.FindControl("corp");
                Label       Lcorp = (Label)row.FindControl("corpid");

                RadioButton Csale = (RadioButton)row.FindControl("sale");
                Label       Lsale = (Label)row.FindControl("saleid");

                if (Co_que.Checked == true)
                {
                    str_oque += "|" + Lo_que.Text + "";
                }

                if (Cindi.Checked == true)
                {
                    str_indi += "|" + Lindi.Text + "";
                }

                if (Cdept.Checked == true)
                {
                    str_dept += "|" + Ldept.Text + "";
                }

                if (Ccorp.Checked == true)
                {
                    str_corp += "|" + Lcorp.Text + "";
                }

                if (Co_full.Checked == true)
                {
                    str_ofull += "|" + Lo_full.Text + "";
                }

                if (Co_add.Checked == true)
                {
                    str_oadd += "|" + Lo_add.Text + "";
                }

                if (Co_mod.Checked == true)
                {
                    str_omod += "|" + Lo_mod.Text + "";
                }

                if (Co_del.Checked == true)
                {
                    str_odel += "|" + Lo_del.Text + "";
                }

                if (Co_exp.Checked == true)
                {
                    str_oexp += "|" + Lo_exp.Text + "";
                }

                if (Co_aud.Checked == true)
                {
                    str_oaud += "|" + Lo_aud.Text + "";
                }

                if (Co_exe.Checked == true)
                {
                    str_oexe += "|" + Lo_exe.Text + "";
                }
            }

            string strall = str_ofull + str_oadd + str_omod + str_odel + str_oexp + str_oaud + str_oexe + str_oque + str_indi + str_dept + str_corp;

            SqlHelper.ExecuteSql("UPDATE JS SET ROLE_QX='" + strall + "' WHERE ROLE_ID='" + hkdb.GetStr(Request.QueryString["roleid"]) + "'");

            mydb.Alert_Goto("操作授权成功,需要注销重新登录系统后才会生效!", "role.aspx");
        }
예제 #25
0
        protected void Save_Click(object Sender, EventArgs E)
        {
            //判断btn
            Button btn = (Button)Sender;
            string s   = btn.ID;

            if (s == "AddBtn")
            {
                xmmc.Text          = "";
                fz.Text            = "";
                kpxz.Text          = "";
                upid.SelectedValue = "0";
                //pfdj.SelectedValue = "否";
                //pfdj_y.Text = "0";
                //pfdj_l.Text = "0";
                //pfdj_z.Text = "0";
                //pfdj_c.Text = "0";
                //pw_zr.Checked = false;
                //pw_fzr.Checked = false;
                //pw_ybpw.Checked = false;
                //pw_gzry.Checked = false;
                pxh.Text  = "";
                xmbz.Text = "";

                //pfdj_y.Enabled = false;
                //pfdj_l.Enabled = false;
                //pfdj_z.Enabled = false;
                //pfdj_c.Enabled = false;

                labelstatus.Text = "新增";

                SaveBtn.Enabled = true;
                DelBtn.Enabled  = false;
            }
            else
            {
                if (labelstatus.Text == "修改")
                {
                    //Demo
                    if (hkdb.IsDemo("Y") == "true")
                    {
                        return;
                    }

                    //判断该项目下是否存在未结束的考评项目
                    string sql1 = "SELECT MXID FROM HR_Kpdf_Kpxm02 A LEFT OUTER JOIN HR_Kpdf_Kpxm01 B ON(A.SSKPID=B.KPID) WHERE A.SSXMID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "' AND B.KPZT<>'已结束'";
                    if (bd.CheckRepeat(sql1) == "true")
                    {
                        mydb.Alert("保存失败,该项目下存在尚未结束的考评项目!");
                        return;
                    }

                    //SqlHelper.ExecuteSql("UPDATE HR_Kpdf_Pfxm SET XMMC='" + hkdb.GetStr(xmmc.Text) + "',UPID='" + upid.SelectedValue + "',FZ='" + hkdb.GetStr(fz.Text) + "',KPXZ='" + hkdb.GetStr(kpxz.Text) + "',PFDJ='" + pfdj.SelectedValue + "',PFDJ_Y='" + hkdb.GetStr(pfdj_y.Text) + "',PFDJ_L='" + hkdb.GetStr(pfdj_l.Text) + "',PFDJ_Z='" + hkdb.GetStr(pfdj_z.Text) + "',PFDJ_C='" + hkdb.GetStr(pfdj_c.Text) + "',Pw_zr='" + hkdb.GetValueChk_Str(pw_zr.Checked) + "',Pw_fzr='" + hkdb.GetValueChk_Str(pw_fzr.Checked) + "',Pw_ybpw='" + hkdb.GetValueChk_Str(pw_ybpw.Checked) + "',Pw_Gzry='" + hkdb.GetValueChk_Str(pw_gzry.Checked) + "',Pxh='" + hkdb.GetStr(pxh.Text) + "',Xmbz='" + hkdb.GetStr(xmbz.Text) + "',Xgr='" + this.Session["UserID"] + "',Xgsj=GETDATE() WHERE XMID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");
                    SqlHelper.ExecuteSql("UPDATE HR_Kpdf_Pfxm SET XMMC='" + hkdb.GetStr(xmmc.Text) + "',UPID='" + upid.SelectedValue + "',FZ='" + hkdb.GetStr(fz.Text) + "',KPXZ='" + hkdb.GetStr(kpxz.Text) + "',Pxh='" + hkdb.GetStr(pxh.Text) + "',Xmbz='" + hkdb.GetStr(xmbz.Text) + "',Xgr='" + this.Session["UserID"] + "',Xgsj=GETDATE() WHERE XMID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");

                    mydb.Alert("保存成功!");
                    Response.Write("<script language=javascript>");
                    Response.Write("window.parent.lframe81102.location='Pfxm_l.aspx';<");
                    Response.Write("/script>");
                }
                else
                {
                    string sql = "SELECT * FROM HR_Kpdf_Pfxm WHERE XMMC='" + hkdb.GetStr(xmmc.Text) + "'";
                    if (bd.CheckRepeat(sql) == "true")
                    {
                        mydb.Alert("保存失败,此名称已经存在!");
                        return;
                    }

                    //SqlHelper.ExecuteSql("INSERT INTO HR_Kpdf_Pfxm(XMMC,UPID,FZ,Kpxz,Pfdj,Pfdj_y,Pfdj_l,Pfdj_z,Pfdj_c,Pw_zr,Pw_fzr,Pw_ybpw,Pw_Gzry,Pxh,Xmbz,Cjr,Cjsj) VALUES('" + hkdb.GetStr(xmmc.Text) + "','" + upid.SelectedValue + "','" + hkdb.GetStr(fz.Text) + "','" + hkdb.GetStr(kpxz.Text) + "','" + pfdj.SelectedValue + "','" + hkdb.GetStr(pfdj_y.Text) + "','" + hkdb.GetStr(pfdj_l.Text) + "','" + hkdb.GetStr(pfdj_z.Text) + "','" + hkdb.GetStr(pfdj_c.Text) + "','" + hkdb.GetValueChk_Str(pw_zr.Checked) + "','" + hkdb.GetValueChk_Str(pw_fzr.Checked) + "','" + hkdb.GetValueChk_Str(pw_ybpw.Checked) + "','" + hkdb.GetValueChk_Str(pw_gzry.Checked) + "','" + hkdb.GetStr(pxh.Text) + "','" + hkdb.GetStr(xmbz.Text) + "','" + this.Session["userid"] + "',GETDATE())");
                    SqlHelper.ExecuteSql("INSERT INTO HR_Kpdf_Pfxm(XMMC,UPID,FZ,Kpxz,Pxh,Xmbz,Cjr,Cjsj) VALUES('" + hkdb.GetStr(xmmc.Text) + "','" + upid.SelectedValue + "','" + hkdb.GetStr(fz.Text) + "','" + hkdb.GetStr(kpxz.Text) + "','" + hkdb.GetStr(pxh.Text) + "','" + hkdb.GetStr(xmbz.Text) + "','" + this.Session["userid"] + "',GETDATE())");

                    mydb.Alert("保存成功!");

                    xmmc.Text          = "";
                    fz.Text            = "";
                    kpxz.Text          = "";
                    upid.SelectedValue = "0";
                    //pfdj.SelectedValue = "否";
                    //pfdj.SelectedValue = "否";
                    //pfdj_y.Text = "0";
                    //pfdj_l.Text = "0";
                    //pfdj_z.Text = "0";
                    //pfdj_c.Text = "0";
                    //pw_zr.Checked = false;
                    //pw_fzr.Checked = false;
                    //pw_ybpw.Checked = false;
                    //pw_gzry.Checked = false;
                    pxh.Text  = "";
                    xmbz.Text = "";

                    //pfdj_y.Enabled = false;
                    //pfdj_l.Enabled = false;
                    //pfdj_z.Enabled = false;
                    //pfdj_c.Enabled = false;

                    Response.Write("<script language=javascript>");
                    Response.Write("window.parent.lframe81102.location='Pfxm_l.aspx';");
                    Response.Write("window.parent.rframe81102.location='Pfxm_r.aspx?k=nex';<");
                    Response.Write("/script>");
                }
            }
        }