Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            hkdb.VeriSess("4");

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

                OperQx();

                DropDownListBind();

                bm_sjbm.SelectedValue = Request.QueryString["id"];

                SqlDataReader datar = SqlHelper.ExecuteReader("SELECT * FROM BM WHERE BM_ID='" + hkdb.GetStr(Request.QueryString["id"]) + "'");
                if (datar.Read())
                {
                    bm_bm.Text            = datar["bm_bm"].ToString();
                    bm_mc.Text            = datar["bm_mc"].ToString();
                    bm_lx.SelectedValue   = datar["bm_lx"].ToString();
                    bm_sjbm.SelectedValue = datar["bm_sjbm"].ToString();
                    bm_fzr.Text           = datar["bm_fzr"].ToString();
                    bm_dh.Text            = datar["bm_dh"].ToString();
                    bm_cz.Text            = datar["bm_cz"].ToString();
                    bm_bz.Text            = datar["bm_bz"].ToString();
                    lbldParid.Text        = datar["bm_sjbm"].ToString();
                    bmglqx.SelectedValue  = datar["bmglqx"].ToString();
                }
                datar.Close();
            }
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            hkdb.VeriSess("4");

            SqlDataReader dr = SqlHelper.ExecuteReader("SELECT * FROM hk_WorkFlowNode WHERE fnID='" + hkdb.GetStr(Request.QueryString["id"]) + "'");

            if (dr.Read())
            {
                fnNum.Text = dr["fnNum"].ToString();
                fnNo.Text  = dr["fnNo"].ToString();
            }
            dr.Close();

            //Del流程步骤
            SqlHelper.ExecuteSql("DELETE FROM hk_WorkFlowNode WHERE fnID='" + hkdb.GetStr(Request.QueryString["id"]) + "'");

            //Del条件设置
            SqlHelper.ExecuteSql("DELETE FROM hk_WorkFlowBranch WHERE fbTofnid='" + hkdb.GetStr(Request.QueryString["id"]) + "'");

            //Del线
            SqlHelper.ExecuteSql("DELETE FROM hk_WorkFlowNodeLine WHERE StartNum='" + hkdb.GetStr(fnNum.Text) + "' AND FK_fnno='" + hkdb.GetStr(fnNo.Text) + "'");

            //Del删除线条件设置
            SqlHelper.ExecuteSql("DELETE FROM hk_WorkFlowNodeLine WHERE EndNum='" + hkdb.GetStr(fnNum.Text) + "' AND FK_fnno='" + hkdb.GetStr(fnNo.Text) + "'");

            mydb.Alert_Reload_Close("删除成功");
        }
Example #3
0
        //gv绑定
        public void ListViewBind()
        {
            string Str1 = " where  ui_status='正常' and ui_lx='企业'";

            if (!string.IsNullOrEmpty(bm.SelectedItem.Value))
            {
                if (bm.SelectedItem.Value == "1000000")
                {
                    Str1 = Str1 + " and yn_bmglz='是'";
                }
                else
                {
                    Str1 = Str1 + " and ui_ssbm= '" + bm.SelectedItem.Value + "' ";
                }
            }

            if (!string.IsNullOrEmpty(cxtj.Text))
            {
                Str1 = Str1 + " and " + hkdb.GetStr(cxtj.Text) + " like '%" + hkdb.GetStr(cxtj.Text) + "%' ";
            }
            DataSet ds = SqlHelper.ExecuteDs("select ui_id,ui_desc,ui_sex,ui_lx,(case when yn_bmglz='是' then 'ch' else 'noch' end)as yn_bmglz,b.bm_mc,c.zwmc 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)" + Str1 + " order by a.ui_desc");

            ListView1.DataSource = ds;
            ListView1.DataBind();
        }
Example #4
0
        public void GridviewBind()
        {
            string Str1 = string.Empty;

            if (dp_fname.SelectedValue != "0")
            {
                Str1 = Str1 + " and A.FK_fid ='" + dp_fname.SelectedValue + "'";
            }

            if (fName.Text != "")
            {
                Str1 = Str1 + " and B.fName like '%" + hkdb.GetStr(fName.Text) + "%'";
            }

            if (wName.Text != "")
            {
                Str1 = Str1 + " and A.etName like '%" + hkdb.GetStr(wName.Text) + "%'";
            }

            if (fnName.Text != "")
            {
                Str1 = Str1 + " and C.fnName like '%" + hkdb.GetStr(fnName.Text) + "%'";
            }

            if (wTitle.Text != "")
            {
                Str1 = Str1 + " and A.etTitle like '%" + hkdb.GetStr(wTitle.Text) + "%'";
            }

            AspNetPager1.RecordCount = (int)SqlHelper.ExecuteScalar("SELECT COUNT(*) FROM hk_WorkEnTrust A LEFT OUTER JOIN hk_Form B ON(A.FK_fid=B.fID) LEFT OUTER JOIN hk_WorkFlowNode C ON(A.FK_fnno=C.fnNo) WHERE A.FK_uid='" + this.Session["userid"] + "'" + Str1);
            DataSet ds = SqlHelper.ExecuteDs("SELECT A.*,B.fName,C.fnName,D.ui_desc,E.ui_desc AS etUserName FROM hk_WorkEnTrust A LEFT OUTER JOIN hk_Form B ON(A.FK_fid=B.fID) LEFT OUTER JOIN hk_WorkFlowNode C ON(A.FK_fnno=C.fnNo) LEFT OUTER JOIN yh D ON(A.etPromoterID=D.ui_id) LEFT OUTER JOIN yh E ON(A.etUserID=E.ui_id) WHERE A.FK_uid='" + this.Session["userid"] + "'" + Str1 + " ORDER BY A.etID DESC", AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1), AspNetPager1.PageSize);

            GridView1.DataSource = ds;
            GridView1.DataBind();
        }
Example #5
0
        //gv绑定
        public void GridViewBind()
        {
            string sql = " WHERE A.SQRID='" + this.Session["userid"] + "'";

            if (!string.IsNullOrEmpty(qjlx.Text))
            {
                sql = sql + " AND A.QJLX='" + hkdb.GetStr(qjlx.Text) + "'";
            }

            if (!string.IsNullOrEmpty(qjzt.SelectedValue))
            {
                sql = sql + " AND A.QJZT='" + qjzt.SelectedValue + "'";
            }

            if (!string.IsNullOrEmpty(qjly.Text))
            {
                sql = sql + " AND A.QJLY LIKE '%" + hkdb.GetStr(qjly.Text) + "%'";
            }

            if (!string.IsNullOrEmpty(qjkssj_s.Text))
            {
                sql = sql + " AND QJKSSJ>='" + hkdb.GetStr(qjkssj_s.Text) + "'";
            }

            if (!string.IsNullOrEmpty(qjkssj_e.Text))
            {
                sql = sql + " AND QJKSSJ<='" + hkdb.GetStr(qjkssj_e.Text) + "'";
            }

            AspNetPager1.RecordCount = (int)SqlHelper.ExecuteScalar("SELECT COUNT(*)AS NUMS FROM OA_KQ_QJD01 A " + sql);
            DataSet ds = SqlHelper.ExecuteDs("SELECT A.* FROM OA_KQ_QJD01 A " + sql + " ORDER BY SQSJ DESC", AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1), AspNetPager1.PageSize);

            GridView1.DataSource = ds;
            GridView1.DataBind();
        }
Example #6
0
        //gv绑定
        public void GridViewBind()
        {
            string Str1 = " WHERE 1=1";

            if (!string.IsNullOrEmpty(kpqs.Text))
            {
                Str1 = Str1 + " AND A.KPQS LIKE '%" + hkdb.GetStr(kpqs.Text) + "%'";
            }

            if (!string.IsNullOrEmpty(kpzt.SelectedValue))
            {
                Str1 = Str1 + " AND A.KPZT= '" + kpzt.SelectedValue + "'";
            }

            if (!string.IsNullOrEmpty(cypw.Text))
            {
                Str1 = Str1 + " AND A.CypwNames LIKE '%" + hkdb.GetStr(cypw.Text) + "%'";
            }

            if (!string.IsNullOrEmpty(ksrq_s.Text))
            {
                Str1 = Str1 + " AND A.Ksrq>='" + hkdb.GetStr(ksrq_s.Text) + "'";
            }

            if (!string.IsNullOrEmpty(ksrq_e.Text))
            {
                Str1 = Str1 + " AND A.Ksrq<='" + hkdb.GetStr(ksrq_e.Text) + "'";
            }

            AspNetPager1.RecordCount = (int)SqlHelper.ExecuteScalar("SELECT COUNT(*) FROM HR_Kpdf_Kpxm01 A" + Str1);
            DataSet ds = SqlHelper.ExecuteDs("SELECT A.*,B.UI_DESC,(SELECT COUNT(DISTINCT ssbid) FROM HR_Kpdf_Kpxm02 WHERE SSKPID=A.KPID)AS BKPRS FROM HR_Kpdf_Kpxm01 A LEFT OUTER JOIN YH B ON (A.CJR=B.UI_ID)" + Str1, AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1), AspNetPager1.PageSize);

            GridView1.DataSource = ds;
            GridView1.DataBind();
        }
Example #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            hkdb.VeriSess("4");

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

                //参数判断
                if (!string.IsNullOrEmpty(Request.QueryString["id"]))
                {
                    lbltitle.Text = "修改";
                    SqlDataReader datar = SqlHelper.ExecuteReader("select Name from OA_KlClass where ID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");
                    if (datar.Read())
                    {
                        Name.Text = datar["Name"].ToString();
                        datar.Close();
                        DelBtn.Visible = true;
                    }
                }
                else
                {
                    lbltitle.Text      = "新增";
                    SaveAddBtn.Visible = true;
                }
            }
        }
Example #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            hkdb.VeriSess("4");

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

                SqlDataReader datar = SqlHelper.ExecuteReader("SELECT * FROM HK_WDYJ WHERE YJID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");
                if (datar.Read())
                {
                    lblyjbt.Text  = datar["yjbt"].ToString();
                    lblnr.Text    = datar["yjnr"].ToString();
                    lblfbsj.Text  = string.Format("{0:d}", datar["fbsj"]);
                    lblfbrmc.Text = datar["fbrmc"].ToString();
                    hfnr.Text     = datar["hfnr"].ToString();
                    Number.Text   = datar["fjmc"].ToString();

                    if (datar["zt"].ToString() == "待回复")
                    {
                        SaveBtn.Visible = true;
                        hfnr.Enabled    = true;
                    }
                    datar.Close();
                }
                else
                {
                    datar.Close();
                    mydb.Alert_Close("此记录不存在,可能已被删除!");
                }

                bd.GetAtt(hkdb.GetStr(Number.Text), "p03", "portal/yjx", fujian);
            }
        }
Example #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            hkdb.VeriSess("4");

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

                DropDownListBind();

                //判断新增还是查看
                if (!string.IsNullOrEmpty(Request.QueryString["id"]))
                {
                    lbltitle.Text  = "修改";
                    DelBtn.Visible = true;
                    SqlDataReader datar = SqlHelper.ExecuteReader("select flmc,flbz,glry from OA_XWFL where flid='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");
                    if (datar.Read())
                    {
                        flmc.Text          = datar["flmc"].ToString();
                        bz.Text            = datar["flbz"].ToString();
                        glry.SelectedValue = datar["glry"].ToString();
                    }
                    else
                    {
                        mydb.Alert_Close("此记录不存在,可能已被删除!");
                    }
                    datar.Close();
                }
                else
                {
                    lbltitle.Text      = "新增";
                    SaveAddBtn.Visible = true;
                }
            }
        }
Example #10
0
        public void GridViewBind()
        {
            string Str1 = " WHERE A.KPZT IN('已生效','已结束') AND CHARINDEX('" + this.Session["userid"] + "',A.CypwIDs)>0";

            if (!string.IsNullOrEmpty(kpqs.Text))
            {
                Str1 = Str1 + " AND A.KPQS LIKE '%" + hkdb.GetStr(kpqs.Text) + "%'";
            }

            if (!string.IsNullOrEmpty(ksrq_s.Text))
            {
                Str1 = Str1 + " AND A.Ksrq>='" + hkdb.GetStr(ksrq_s.Text) + "'";
            }

            if (!string.IsNullOrEmpty(ksrq_e.Text))
            {
                Str1 = Str1 + " AND A.Ksrq<='" + hkdb.GetStr(ksrq_e.Text) + "'";
            }

            AspNetPager1.RecordCount = (int)SqlHelper.ExecuteScalar("SELECT COUNT(*) FROM HR_Kpdf_Kpxm01 A" + Str1);
            DataSet ds = SqlHelper.ExecuteDs("SELECT A.*,B.UI_DESC,(SELECT COUNT(DISTINCT ssbid) FROM HR_Kpdf_Kpxm02 WHERE SSKPID=A.KPID)AS BKPRS,(SELECT COUNT(*) FROM HR_Kpdf_Kpxm02 WHERE SSKPID=A.KPID)AS YPF_NUMS,(SELECT COUNT(*) FROM HR_Kpdf_Kpxm04 WHERE SSKPID=A.KPID)AS SJPF_NUMS FROM HR_Kpdf_Kpxm01 A LEFT OUTER JOIN YH B ON (A.CJR=B.UI_ID)" + Str1, AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1), AspNetPager1.PageSize);

            GridView1.DataSource = ds;
            GridView1.DataBind();
        }
Example #11
0
        //绑定数据
        public void GridViewBind()
        {
            SqlDataReader datar = SqlHelper.ExecuteReader("select a.*,b.mc,c.bm_mc,d.hys_mc from oa_hyqc a left outer JOIN hk_ZDYLX b on (a.hylx=b.id) left outer JOIN BM c on (a.zkbm=c.bm_id) left outer join oa_hys d on (a.zkdd=d.hys_id) where a.id='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "' and a.zt='送审中'");

            if (datar.Read())
            {
                hyzt.Text = datar["hyzt"].ToString();
                hylx.Text = datar["mc"].ToString();
                kssj.Text = datar["kssj"].ToString();
                jssj.Text = datar["jssj"].ToString();
                zkbm.Text = datar["bm_mc"].ToString();
                zkdd.Text = datar["hys_mc"].ToString();
                cxfw.Text = datar["cxfw"].ToString();
                //将人员编码转化为名称
                cjry.Text          = (SqlHelper.ExecuteScalar("exec sp_IdToName '" + datar["cjry"] + "','1'") == System.DBNull.Value ? "" : (string)(SqlHelper.ExecuteScalar("exec sp_IdToName '" + datar["cjry"] + "','1'")));
                fzr.Text           = datar["zcr"].ToString();
                jysm.Text          = datar["jysm"].ToString();
                savefj.Text        = datar["hyzl"].ToString();
                savefj.NavigateUrl = (datar["path"] == System.DBNull.Value ? "" : "../.." + datar["path"].ToString()) + datar["hyzl"].ToString();
                vsdate.Text        = datar["kssj"].ToString();
                vedate.Text        = datar["jssj"].ToString();
                ycxx.Text          = datar["fqr"].ToString();
                ycdd.Text          = datar["zkdd"].ToString();
                datar.Close();
            }
            else
            {
                datar.Close();
                mydb.Alert_Close("此会议已审批完成!");
            }
            if (!string.IsNullOrEmpty(savefj.Text))
            {
                savefj.Text = "下载会议资料";
            }
        }
Example #12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //Session判断
            hkdb.VeriSess("4");

            if (!IsPostBack)
            {
                //模块权限
                hkdb.PassTo("13802", "0");


                //参数判断
                if (!string.IsNullOrEmpty(Request.QueryString["id"]))
                {
                    SqlDataReader datar = SqlHelper.ExecuteReader("SELECT * FROM OA_Rwfbdw WHERE id='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");
                    if (datar.Read())
                    {
                        num.Text     = datar["num"].ToString();
                        name.Text    = datar["name"].ToString();
                        address.Text = datar["address"].ToString();
                        charge.Text  = datar["charge"].ToString();
                        tel.Text     = datar["tel"].ToString();
                        datar.Close();
                    }
                    else
                    {
                        datar.Close();
                        mydb.Alert_Close("该记录不存在,可能已被删除!");
                    }
                }
            }
        }
Example #13
0
        public void GridViewBind()
        {
            string Str1 = " WHERE 1=1";

            if (!string.IsNullOrEmpty(jsName.Text))
            {
                Str1 = Str1 + " AND slName LIKE '%" + hkdb.GetStr(jsName.Text) + "%' ";
            }

            if (!string.IsNullOrEmpty(jsRealname.Text))
            {
                Str1 = Str1 + " AND B.ui_Desc LIKE '%" + hkdb.GetStr(jsRealname.Text) + "%' ";
            }

            if (!string.IsNullOrEmpty(jsUsetime.Text))
            {
                Str1 = Str1 + " AND convert(char(10),cast(UseTime as datetime),120)=convert(char(10),cast('" + jsUsetime.Text + "' as datetime),120)";
            }

            AspNetPager1.RecordCount = (int)SqlHelper.ExecuteScalar("SELECT COUNT(*) FROM hk_SealLog A LEFT OUTER JOIN yh B ON(A.FK_uid=B.ui_id)" + Str1);
            DataSet ds = SqlHelper.ExecuteDs("SELECT A.*,B.ui_desc FROM hk_SealLog A LEFT OUTER JOIN yh B ON(A.FK_uid=B.ui_id)" + Str1 + " ORDER BY slID DESC", AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1), AspNetPager1.PageSize);

            GridView1.DataSource = ds;
            GridView1.DataBind();
        }
Example #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            hkdb.VeriSess("4");

            if (!IsPostBack)
            {
                BindDplist();
                BindAttr();

                SqlDataReader dr = SqlHelper.ExecuteReader("SELECT * FROM hk_WorkFlow WHERE wfID='" + hkdb.GetStr(Request.QueryString["id"]) + "'");
                if (dr.Read())
                {
                    fNo.Text                     = dr["FK_fno"].ToString();
                    fName.SelectedValue          = dr["FK_fid"].ToString();
                    wfNo.Text                    = dr["wfNo"].ToString();
                    wfStatus.SelectedValue       = dr["wfStatus"].ToString();
                    wfName.Text                  = dr["wfName"].ToString();
                    wfUserIDs.Text               = dr["wfUserIDs"].ToString();
                    wfUserNames.Text             = dr["wfUserNames"].ToString();
                    wfDeptIDs.Text               = dr["wfDeptIDs"].ToString();
                    wfDept.Text                  = dr["wfDeptNames"].ToString();
                    FK_ffid.SelectedValue        = dr["FK_ffid"].ToString();
                    FileNo.Text                  = dr["FileNo"].ToString();
                    FileStartNo.Text             = dr["FileStartNo"].ToString();
                    FileDigit.Text               = dr["FileDigit"].ToString();
                    rb_ynModFileNo.SelectedValue = dr["ynModFileNo"].ToString();
                }
                dr.Close();
            }
        }
Example #15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            hkdb.VeriSess("4");

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

                DropDownListBind();
                //dp绑定

                BindAttr();

                //参数判断
                if (!string.IsNullOrEmpty(Request.QueryString["id"]))
                {
                    lbltitle.Text = "修改";
                    SqlDataReader datar = SqlHelper.ExecuteReader("select * from OA_KlClassSub where ID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");
                    if (datar.Read())
                    {
                        Name.Text             = datar["Name"].ToString();
                        BigName.SelectedValue = datar["BigId"].ToString();
                        UserName.Text         = datar["SyRealname"].ToString();
                        UserID.Text           = datar["SyUsername"].ToString();
                        datar.Close();
                        DelBtn.Visible = true;
                    }
                }
                else
                {
                    lbltitle.Text      = "新增";
                    SaveAddBtn.Visible = true;
                }
            }
        }
Example #16
0
        //gv绑定
        public void GridViewBind()
        {
            string Str1 = " where 1=1";

            if (!string.IsNullOrEmpty(Name.Text))
            {
                Str1 = Str1 + " and Name like '%" + hkdb.GetStr(Name.Text) + "%'";
                if (!string.IsNullOrEmpty(bigid.SelectedValue))
                {
                    Str1 = Str1 + " and Name like '%" + hkdb.GetStr(Name.Text) + "%' and BigId='" + bigid.SelectedValue + "'";
                }
            }
            else
            {
                if (!string.IsNullOrEmpty(bigid.SelectedValue))
                {
                    Str1 = Str1 + " and BigId='" + bigid.SelectedValue + "'";
                }
            }

            AspNetPager1.RecordCount = (int)SqlHelper.ExecuteScalar("select count(*) as nums from OA_KlClassSub" + Str1);
            DataSet ds = SqlHelper.ExecuteDs("select * from OA_KlClassSub " + Str1, AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1), AspNetPager1.PageSize);

            GridView1.DataSource = ds;
            GridView1.DataBind();
        }
Example #17
0
        protected void Page_Load(object Sender, EventArgs E)
        {
            hkdb.VeriSess("4");

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

                //考评项目
                SqlDataReader dr_xm = SqlHelper.ExecuteReader("SELECT KPQS FROM HR_Kpdf_Kpxm01 WHERE KPID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");
                if (dr_xm.Read())
                {
                    lblxmmc.Text = dr_xm["KPQS"].ToString();
                }
                dr_xm.Close();

                //评委类型
                SqlDataReader dr_pw = SqlHelper.ExecuteReader("SELECT PWLX FROM HR_Kpdf_Pw WHERE PID='" + this.Session["userid"] + "'");
                if (dr_pw.Read())
                {
                    lblpwlx.Text = dr_pw["PWLX"].ToString();
                }
                dr_pw.Close();

                GridViewBind();
            }
        }
Example #18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            hkdb.VeriSess("4");

            xmid.Text = (string)Request.QueryString["id"].ToString();
            if (!IsPostBack)
            {
                hkdb.PassTo("11505", "0");

                lblAttachSize.Text = Convert.ToString(SqlHelper.ExecuteScalar("SELECT P_STRING FROM hk_CSDA WHERE PARAMT='P_fj_size'"));

                if (string.IsNullOrEmpty(Request.QueryString["id"]))
                {
                    SaveBtn.Enabled = false;
                }

                if (!string.IsNullOrEmpty(Request.QueryString["fjid"]))
                {
                    fjid.Text = Request.QueryString["fjid"];
                    SqlDataReader dr = SqlHelper.ExecuteReader("select * from oa_xmgl_fj where fjid='" + hkdb.GetStr(Request.QueryString["fjid"].ToString()) + "'");
                    if (dr.Read())
                    {
                        fjbt.Text = dr["fjbt"].ToString();
                    }
                    dr.Close();
                }
            }

            GridViewBind();
        }
Example #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            hkdb.VeriSess("4");

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

                //附件类型
                SqlDataReader dr = SqlHelper.ExecuteReader("SELECT p_string FROM hk_CSDA WHERE paramt='P_AttType'");
                if (dr.Read())
                {
                    attKey = dr["p_string"].ToString();
                }
                dr.Close();

                BindAttr();

                SqlDataReader datar = SqlHelper.ExecuteReader("select id,Number,Title from OA_KnowLedge   where  Number='" + hkdb.GetStr(Request.QueryString["Number"]) + "'  ");
                if (datar.Read())
                {
                    KmTitle = datar["Title"].ToString();
                }
                datar.Close();

                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 + "";
            }

            BindDpList();
        }
Example #20
0
        protected void Save_Click(object sender, EventArgs e)
        {
            if (lbltitle.Text == "新增")
            {
                int newID = (Int32)SqlHelper.ExecuteScalar("INSERT INTO HK_GROUPS(GNAME,GTYPE,GDESC,CJR,CJSJ) VALUES('" + hkdb.GetStr(gname.Text) + "','" + lx.SelectedValue + "','" + hkdb.GetStr(gdesc.Text) + "','" + this.Session["userid"] + "',GETDATE())" + "SELECT CAST(scope_identity() AS int)");
                //日志
                mydb.InsertLog("新增待办事项分组【" + gname.Text + "】", "60306");
            }
            else
            {
                SqlHelper.ExecuteSql("UPDATE HK_GROUPS SET gname='" + hkdb.GetStr(gname.Text) + "',gdesc='" + hkdb.GetStr(gdesc.Text) + "',xgr='" + this.Session["userid"] + "',xgsj=GETDATE() WHERE GID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");
                //日志
                mydb.InsertLog("修改待办事项分组【" + gname.Text + "】", "60306");
            }

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

            if (s == "SaveAddBtn")
            {
                Clear_Click();
                mydb.Alert_Refresh("保存成功,请新增下一条记录!", "Dbsxfz.aspx");
            }
            else
            {
                mydb.Alert_Refresh_Close("保存成功!", "Dbsxfz.aspx");
            }
        }
Example #21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //Session判断
            hkdb.VeriSess("4");

            //显示标签
            if ((Request["ListType"] != null))
            {
                ListType = Int32.Parse(Request["ListType"].ToString());
            }
            else
            {
                ListType = 1;
            }

            if (!IsPostBack)
            {
                //模块权限
                hkdb.PassTo("60305", "0");

                lblyh.Text = SqlHelper.ExecuteScalar("SELECT UI_DESC FROM YH WHERE UI_ID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'").ToString();

                //页面绑定
                GridViewBind();
            }
        }
Example #22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            hkdb.VeriSess("4");

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

                OperQx();

                //参数判断
                if (!string.IsNullOrEmpty(Request.QueryString["id"]))
                {
                    SqlDataReader datar = SqlHelper.ExecuteReader("SELECT ZWMC,ZWMS,GWZZ FROM ZW WHERE ZWID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");
                    if (datar.Read())
                    {
                        zwmc.Text    = datar["zwmc"].ToString();
                        zwms.Text    = datar["zwms"].ToString();
                        editor.Value = datar["gwzz"].ToString();
                        datar.Close();
                    }
                    else
                    {
                        datar.Close();
                        mydb.Alert_Close("此记录不存在,可能已被删除!");
                    }
                }
            }
        }
Example #23
0
        //gv绑定
        public void GridViewBind()
        {
            //岗位分
            lblgwf.Text = "岗位分:" + SqlHelper.ExecuteScalar("SELECT ISNULL(SUM(FZ),0) FROM HR_Kpdf_Bkpr02 WHERE SSBID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'").ToString();

            SqlDataSource1.SelectCommand = "";
            SqlDataSource1.SelectCommand = "SELECT A.*,B.XMMC FROM HR_Kpdf_Bkpr02 A LEFT OUTER JOIN HR_Kpdf_Pfxm B ON(A.SSXMID=B.XMID) WHERE SSBID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "' ORDER BY B.PXH";
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            hkdb.VeriSess("4");

            if (!IsPostBack)
            {
                hkdb.PassTo("11802,11803", "0");

                //附件
                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 + "";

                //dp绑定
                DropDownListBind();

                //参数判断
                if (!string.IsNullOrEmpty(Request.QueryString["id"]))
                {
                    SqlDataReader datar = SqlHelper.ExecuteReader("SELECT * FROM OA_FilesManageBook WHERE ID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");
                    if (datar.Read())
                    {
                        Number.Text             = datar["Number"].ToString();
                        Num.Text                = datar["Num"].ToString();
                        Name.Text               = datar["Name"].ToString();
                        wjTitle.Text            = datar["Title"].ToString();
                        OtherTitle.Text         = datar["OtherTitle"].ToString();
                        FwCompany.Text          = datar["FwCompany"].ToString();
                        FwTime.Text             = datar["FwTime"].ToString();
                        Miji.SelectedValue      = datar["Miji"].ToString();
                        Dengji.SelectedValue    = datar["Dengji"].ToString();
                        WjType.SelectedValue    = datar["WjType"].ToString();
                        GwType.SelectedValue    = datar["GwType"].ToString();
                        WjNum.Text              = datar["WjNum"].ToString();
                        DyNum.Text              = datar["DyNum"].ToString();
                        FilesName.SelectedValue = datar["FilesId"].ToString();
                        Remark.Text             = datar["Remark"].ToString();
                        datar.Close();
                    }
                    else
                    {
                        datar.Close();
                        mydb.Alert_Close("此记录不存在,可能已被删除!");
                    }
                }
            }

            BindDpList();
        }
Example #25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            hkdb.VeriSess("4");

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

                OperQx();

                BindAttr();

                //使用范围
                if (this.Session["systype"].ToString() == "A")     //主登录页
                {
                    SqlDataReader datar1 = SqlHelper.ExecuteReader("SELECT xh FROM hk_Init WHERE produID IN('M','V')");
                    if (datar1.Read())
                    {
                        lbllx.Visible = true;
                        lx.Visible    = true;
                    }
                    datar1.Close();
                }
                else  //子登录页
                {
                    if (this.Session["systype"].ToString() == "M" | this.Session["systype"].ToString() == "V")
                    {
                        lbllx.Visible = true;
                        lx.Visible    = true;
                    }
                }

                DropDownListBind();

                //dp绑定
                SqlDataReader datar = SqlHelper.ExecuteReader("SELECT * FROM HK_YJX WHERE ID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");
                if (datar.Read())
                {
                    mc.Text           = datar["mc"].ToString();
                    gly.SelectedValue = datar["gly"].ToString();
                    bz.Text           = datar["bz"].ToString();
                    lx.SelectedValue  = datar["lx"].ToString();
                    UserID.Text       = datar["UserIDs"].ToString();
                    UserName.Text     = datar["UserNames"].ToString();
                    datar.Close();

                    if (lx.SelectedValue != "企业")
                    {
                        p_yhfw.Visible = false;
                    }
                }
                else
                {
                    datar.Close();
                    mydb.Alert_Close("此记录不存在,可能已被删除!");
                }
            }
        }
Example #26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            hkdb.VeriSess("4");

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

                //dp绑定
                DropDownListBind();

                if (!string.IsNullOrEmpty(Request.QueryString["classid"]))
                {
                    SqlDataReader datar = SqlHelper.ExecuteReader("SELECT * FROM HK_NETDISK_DIR WHERE DIRID='" + hkdb.GetStr(Request.QueryString["classid"].ToString()) + "' AND USERID='" + this.Session["userid"] + "'");
                    if (datar.Read())
                    {
                        mlid.Text             = datar["DirID"].ToString();
                        mlmc.Text             = datar["Name"].ToString();
                        DirList.SelectedValue = datar["ParentID"].ToString();
                        if (datar["Share"].ToString() == "是")
                        {
                            share.Checked = true;
                        }
                        else
                        {
                            share.Checked = false;
                        }

                        //if (datar["ParentID"].ToString() == "0")
                        //{
                        //    DirList.Enabled = false;
                        //}
                        //else
                        //{
                        //    DirList.Enabled = true;
                        //}
                        datar.Close();

                        SaveBtn.Enabled = true;
                        DelBtn.Enabled  = true;
                    }
                    else
                    {
                        datar.Close();
                        mydb.Alert("该文件夹不存在,可能已被删除!");
                    }
                }

                //判断状态
                if (Request.QueryString["k"] == "nex")
                {
                    lblsta.Text     = "-> 新增状态";
                    SaveBtn.Enabled = true;
                    DelBtn.Enabled  = true;
                }
            }
        }
Example #27
0
        protected void Page_Load(object sender, EventArgs e)
        {
            hkdb.VeriSess("4");

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

                //附件
                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 + "";

                SqlDataReader datar = SqlHelper.ExecuteReader("SELECT * FROM HK_WDYJ WHERE YJID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");
                if (datar.Read())
                {
                    lblyjbt.Text  = datar["yjbt"].ToString();
                    editor.Value  = hkdb.GetStrTeOut(datar["yjnr"].ToString());
                    lblfbsj.Text  = string.Format("{0:d}", datar["fbsj"]);
                    lblfbrmc.Text = datar["fbrmc"].ToString();
                    lblhfnr.Text  = datar["hfnr"].ToString();
                    lblhfsj.Text  = string.Format("{0:d}", datar["hfsj"]);
                    lblhfrmc.Text = datar["hfrmc"].ToString();

                    if (!string.IsNullOrEmpty(datar["fjmc"].ToString()))
                    {
                        Number.Text = datar["fjmc"].ToString();
                    }

                    if (datar["zt"].ToString() == "待回复")
                    {
                        SaveBtn.Visible   = true;
                        DelBtn.Visible    = true;
                        uploadBtn.Visible = true;
                        AttDelBtn.Visible = true;
                    }
                    datar.Close();
                }
                else
                {
                    datar.Close();
                    mydb.Alert_Close("此记录不存在,可能已被删除!");
                }
            }

            BindDpList();
        }
Example #28
0
        public void GridViewBind()
        {
            if (Rbl.SelectedValue == "1")
            {
                tjStr = "知识标题";
                nrStr = "" + hkdb.GetStr(nr.Text) + "";

                DataSet ds = SqlHelper.ExecuteDs("select * from OA_KnowLedge where Title like '%" + nrStr + "%'  and ((CHARINDEX('," + this.Session["userid"].ToString() + ",',','+QxYdUsername+',') > 0 )  or QxYdUsername='******') and State='正常' order by id desc", AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1), AspNetPager1.PageSize);
                GridView1.DataSource = ds;
                GridView1.DataBind();
            }
            else if (Rbl.SelectedValue == "2")
            {
                tjStr = "知识描述";
                nrStr = "" + hkdb.GetStr(nr.Text) + "";

                DataSet ds = SqlHelper.ExecuteDs("select * from OA_KnowLedge where Content like '%" + nrStr + "%'  and ((CHARINDEX('," + this.Session["userid"].ToString() + ",',','+QxYdUsername+',') > 0 )  or QxYdUsername='******') and State='正常' order by id desc", AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1), AspNetPager1.PageSize);
                GridView1.DataSource = ds;
                GridView1.DataBind();
            }

            else if (Rbl.SelectedValue == "3")
            {
                tjStr = "作者";
                nrStr = "" + hkdb.GetStr(nr.Text) + "";

                DataSet ds = SqlHelper.ExecuteDs("select * from OA_KnowLedge where Realname like '%" + nrStr + "%'  and ((CHARINDEX('," + this.Session["userid"].ToString() + ",',','+QxYdUsername+',') > 0 )  or QxYdUsername='******') and State='正常' order by id desc", AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1), AspNetPager1.PageSize);
                GridView1.DataSource = ds;
                GridView1.DataBind();
            }

            else if (Rbl.SelectedValue == "4")
            {
                tjStr = "关键字";
                nrStr = "" + hkdb.GetStr(nr.Text) + "";

                DataSet ds = SqlHelper.ExecuteDs("select * from OA_KnowLedge where KeyWord like '%" + nrStr + "%'  and ((CHARINDEX('," + this.Session["userid"].ToString() + ",',','+QxYdUsername+',') > 0 )  or QxYdUsername='******') and State='正常' order by id desc", AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1), AspNetPager1.PageSize);
                GridView1.DataSource = ds;
                GridView1.DataBind();
            }

            else if (Rbl.SelectedValue == "5")
            {
                tjStr = "综合搜索";
                nrStr = "" + hkdb.GetStr(nr.Text) + "";

                DataSet ds = SqlHelper.ExecuteDs("select * from OA_KnowLedge where (KeyWord like '%" + nrStr + "%' or KeyWord like '%" + nrStr + "%'  or Realname like '%" + nrStr + "%'   or Content like '%" + nrStr + "%'  or  Title like '%" + nrStr + "%')  and ((CHARINDEX('," + this.Session["userid"].ToString() + ",',','+QxYdUsername+',') > 0 )  or QxYdUsername='******') and State='正常' order by id desc", AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1), AspNetPager1.PageSize);
                GridView1.DataSource = ds;
                GridView1.DataBind();
            }
            else
            {
                tjStr = "无";
                nrStr = "无";
            }
        }
Example #29
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            SqlHelper.ExecuteSql("Update hk_Ygtxl_lb Set Name='" + hkdb.GetStr(Name.Text) + "',PxNum='" + hkdb.GetStr(PxNum.Text) + "' where id='" + int.Parse(Request.QueryString["id"]) + "'  ");

            SqlHelper.ExecuteSql("Update hk_Ygtxl Set FoldersName='" + hkdb.GetStr(Name.Text) + "' where FoldersID='" + int.Parse(Request.QueryString["id"]) + "' ");

            mydb.InsertLog("修改部门名称[" + Name.Text + "]", "11310");

            this.Response.Write("<script language=javascript>alert('提交成功!'); window.parent.lhead.location='Ygtxl_l.aspx';window.location.href='Ygtxl_r.aspx'</script>");
        }
Example #30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            hkdb.VeriSess("4");

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

                BindAttr();

                //dp绑定
                DropDownListBind();

                //参数判断
                if (!string.IsNullOrEmpty(Request.QueryString["id"]))
                {
                    SqlDataReader datar = SqlHelper.ExecuteReader("SELECT * FROM OA_FilesManage WHERE ID='" + hkdb.GetStr(Request.QueryString["id"].ToString()) + "'");
                    if (datar.Read())
                    {
                        Number.Text                = datar["Number"].ToString();
                        Name.Text                  = datar["Name"].ToString();
                        RoomName.SelectedValue     = datar["RoomId"].ToString();
                        RoomName.SelectedItem.Text = datar["RoomName"].ToString();
                        BackYear.Text              = datar["BackYear"].ToString();
                        Starttime.Text             = datar["Starttime"].ToString();
                        Endtime.Text               = datar["Endtime"].ToString();
                        UnitName.SelectedValue     = datar["UnitId"].ToString();
                        UnitName.SelectedItem.Text = datar["UnitName"].ToString();
                        BzPost.Text                = datar["BzPost"].ToString();
                        BgTime.Text                = datar["BgTime"].ToString();
                        DengJi.SelectedValue       = datar["DengJi"].ToString();
                        QuanZong.Text              = datar["QuanZong"].ToString();
                        Mulu.Text                  = datar["Mulu"].ToString();
                        DaGuan.Text                = datar["DaGuan"].ToString();
                        BaoXian.Text               = datar["BaoXian"].ToString();
                        SuoWei.Text                = datar["SuoWei"].ToString();
                        PinZheng.SelectedValue     = datar["PinZheng"].ToString();
                        PzStartNum.Text            = datar["PzStartNum"].ToString();
                        PzEndNum.Text              = datar["PzEndNum"].ToString();
                        YeShu.Text                 = datar["YeShu"].ToString();
                        wfDeptIDs.Text             = datar["QxUnitId"].ToString();
                        wfDept.Text                = datar["QxUnitName"].ToString();
                        State.SelectedValue        = datar["State"].ToString();
                        Remark.Text                = datar["Remark"].ToString();
                        datar.Close();
                    }
                    else
                    {
                        datar.Close();
                        mydb.Alert_Close("此记录不存在,可能已被删除!");
                    }
                }
            }
        }