예제 #1
0
    //ZWL.BLL.ERPHuiBao Model2 = new ZWL.BLL.ERPHuiBao();
    //protected void ZT1_Click(object sender, EventArgs e)
    //{
    //    Model2.ID = int.Parse(Request.QueryString["ID"].ToString());
    //    Model2.ZT = "预警保存";
    //    Model2.UpdateZT();
    //    ZWL.Common.MessageBox.ShowAndRedirect(this, "状态修改成功!", "HuiBao.aspx");
    //}
    //protected void ZT2_Click(object sender, EventArgs e)
    //{
    //    Model2.ID = int.Parse(Request.QueryString["ID"].ToString());
    //    Model2.ZT = "预警转发";
    //    Model2.UpdateZT();
    //    ZWL.Common.MessageBox.ShowAndRedirect(this, "状态修改成功!", "HuiBao.aspx");
    //}
    //protected void ZT3_Click(object sender, EventArgs e)
    //{
    //    Model2.ID = int.Parse(Request.QueryString["ID"].ToString());
    //    Model2.ZT = "预警取消";
    //    Model2.UpdateZT();
    //    ZWL.Common.MessageBox.ShowAndRedirect(this, "状态修改成功!", "HuiBao.aspx");
    //}
    #endregion

    protected void btn_Sub_Click(object sender, EventArgs e)
    {
        ZWL.BLL.ERPHuiBao Model = new ZWL.BLL.ERPHuiBao();
        Model.ID         = int.Parse(Request.QueryString["ID"].ToString());
        Model.TitleStr   = this.TextBox1.Text;
        Model.ContentStr = this.TxtContent.Text;
        //Model.CanLookUser = this.TextBox2.Text;
        Model.DDWL        = this.ddl_WarningType.SelectedValue;
        Model.CanLookUser = this.UserName_Input.Value;
        Model.TimeStr     = DateTime.Now;
        Model.FuJianStr   = ZWL.Common.PublicMethod.GetSessionValue("WenJianList");
        Model.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        Model.DDWL        = this.TextBox3.Text;
        Model.SSBM        = ZWL.Common.PublicMethod.GetSessionValue("Department");
        if (string.IsNullOrEmpty(this.TextBox2.Text))  //此处只是判断,无需修改成真实姓名
        {
            Model.ZT = "信息保存";
        }
        else
        {
            Model.ZT = "信息转发";
        }
        Model.Update();

        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户修改工作报告信息(" + this.TextBox1.Text + ")";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();
        Response.Write("<script>alert('工作报告修改成功!');window.location.href='" + ReturnInput.Value + "'</script>");
    }
예제 #2
0
파일: HuiBaoD.aspx.cs 프로젝트: cnbin/HLB
    //string Department_ID;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.BLL.ERPBuMen BuMenModel = new ZWL.BLL.ERPBuMen();
            //Department_ID = BuMenModel.GetList("BuMenName='" + ZWL.Common.PublicMethod.GetSessionValue("Department") + "'").Tables[0].Rows[0]["ID"].ToString();
            ZWL.Common.PublicMethod.CheckSession();
            DataBindToGridview();

            //设定按钮权限
            btn_Add.Visible    = ZWL.Common.PublicMethod.StrIFIn("|112A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            btn_Change.Visible = ZWL.Common.PublicMethod.StrIFIn("|112M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            btn_Del.Visible    = ZWL.Common.PublicMethod.StrIFIn("|112D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            btn_Report.Visible = ZWL.Common.PublicMethod.StrIFIn("|112E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            string uname = System.Web.HttpContext.Current.Session["UserName"].ToString();


            if ((Request["token"] ?? "") == "ajax" && !string.IsNullOrEmpty(uname))
            {
                string            res     = "";
                ZWL.BLL.ERPHuiBao MyModel = new ZWL.BLL.ERPHuiBao();

                res = MyModel.GetListByZT("预警取消");
                Response.Clear();
                Response.Write(res);
                Response.End();
            }
        }
    }
예제 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            //绑定页面数据
            ZWL.BLL.ERPHuiBao MyModel = new ZWL.BLL.ERPHuiBao();
            MyModel.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
            this.Label1.Text = MyModel.TitleStr;
            this.Label2.Text = MyModel.CanLookUser;
            this.Label6.Text = MyModel.ContentStr;
            this.Label4.Text = MyModel.UserName;
            this.Label5.Text = MyModel.TimeStr.ToString();

            this.HyperLink1.NavigateUrl = "../LanEmail/LanEmailAdd.aspx?UserName="******"../UploadFile/");

            //写系统日志
            ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
            MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
            MyRiZhi.DoSomething = "查看工作汇报信息(" + this.Label1.Text + ")";
            MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
            MyRiZhi.Add();
        }
    }
예제 #4
0
파일: HuiBaoD.aspx.cs 프로젝트: cnbin/HLB
    public static string GetWarning()
    {
        string res = "";

        ZWL.BLL.ERPHuiBao MyModel = new ZWL.BLL.ERPHuiBao();
        res = MyModel.GetListByDeparment(int.Parse(ZWL.Common.PublicMethod.GetSessionValue("DepartmentID")));
        return(res);
    }
예제 #5
0
파일: Warning.aspx.cs 프로젝트: cnbin/HLB
    public static string GetWarning(string uname, string TitleStr)
    {
        string res = "";

        ZWL.BLL.ERPHuiBao MyModel = new ZWL.BLL.ERPHuiBao();
        res = MyModel.GetListByUserNameTitleStr(uname, TitleStr);
        return(res);
    }
예제 #6
0
    public void DataBindToGridview()
    {
        DataEntityDataContext context = new DataEntityDataContext();

        ZWL.BLL.ERPHuiBao MyLanEmail = new ZWL.BLL.ERPHuiBao();
        var T = context.ERPHuiBao.Where(p => p.UserName == ZWL.Common.PublicMethod.GetSessionValue("UserName")).OrderByDescending(p => p.ID);

        EmailList = T.ToList();
    }
예제 #7
0
 public void DataBindToGridview()
 {
     ZWL.BLL.ERPHuiBao MyModel = new ZWL.BLL.ERPHuiBao();
     GVData.DataSource = MyModel.GetList("TitleStr Like '%" + this.TextBox1.Text + "%' and ','+CanLookUser+',' like '%," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",%' order by ID desc");
     GVData.DataBind();
     LabPageSum.Text     = Convert.ToString(GVData.PageCount);
     LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
     this.GoPage.Text    = LabCurrentPage.Text.ToString();
 }
예제 #8
0
파일: HuiBao.aspx.cs 프로젝트: chocoai/YOA
    public void DataBindToGridview()
    {
        GVData.PageSize  = AspNetPager1.PageSize;
        GVData.PageIndex = AspNetPager1.CurrentPageIndex - 1;
        ZWL.BLL.ERPHuiBao MyModel = new ZWL.BLL.ERPHuiBao();
        DataSet           ds      = MyModel.GetList("TitleStr Like '%" + this.TextBox1.Text + "%' and UserName='******' order by ID desc");

        GVData.DataSource = ds;
        GVData.DataBind();
        AspNetPager1.RecordCount = ds.Tables[0].Rows.Count;
    }
예제 #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            //绑定页面数据
            ZWL.BLL.ERPHuiBao MyModel = new ZWL.BLL.ERPHuiBao();
            MyModel.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
            if (MyModel != null)
            {
                this.Label1.Text = MyModel.TitleStr;
                string CanLookUser = "";
                foreach (string C in MyModel.CanLookUser.Split(','))
                {
                    string CTrueName = ZWL.DBUtility.DbHelperSQL.GetSHSL("select [TrueName] from ERPUser where [UserName]='" + C + "'");
                    if (!string.IsNullOrEmpty(CTrueName))
                    {
                        CanLookUser += CanLookUser == "" ? CTrueName : "," + CTrueName;
                    }
                    else
                    {
                        CanLookUser += CanLookUser == "" ? C : "," + C;
                    }
                }
                this.Label2.Text = CanLookUser;

                this.Label6.Text = MyModel.ContentStr;
                string TrueName = ZWL.DBUtility.DbHelperSQL.GetSHSL("select top 1 [TrueName] from ERPUser where [UserName]='" + MyModel.UserName + "'");

                this.Label4.Text = TrueName;
                this.Label5.Text = MyModel.TimeStr.ToString();
                this.Label8.Text = MyModel.DDWL;
                this.Label7.Text = MyModel.ZT;
                this.Label3.Text = ZWL.Common.PublicMethod.GetWenJian(MyModel.FuJianStr, "../UploadFile/");
            }


            //写系统日志
            ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
            MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
            MyRiZhi.DoSomething = "查看工作报告信息(" + this.Label1.Text + ")";
            MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
            MyRiZhi.Add();

            QD.Visible  = ZWL.Common.PublicMethod.StrIFIn("|111M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            ZT1.Visible = ZWL.Common.PublicMethod.StrIFIn("|111M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            ZT3.Visible = ZWL.Common.PublicMethod.StrIFIn("|111M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));

            ReturnInput.Value = Request.UrlReferrer.ToString() == null ? "../WorkPlan/HuiBaoM.aspx" : Request.UrlReferrer.ToString();
        }
    }
예제 #10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            //绑定页面数据
            ZWL.BLL.ERPHuiBao MyModel = new ZWL.BLL.ERPHuiBao();
            MyModel.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
            this.TextBox1.Text   = MyModel.TitleStr;
            this.TextBox2.Text   = MyModel.CanLookUser;
            this.TxtContent.Text = MyModel.ContentStr;

            ZWL.Common.PublicMethod.SetSessionValue("WenJianList", MyModel.FuJianStr);
            ZWL.Common.PublicMethod.BindDDL(this.CheckBoxList1, ZWL.Common.PublicMethod.GetSessionValue("WenJianList"));
        }
    }
예제 #11
0
    public void DataBindToGridview()
    {
        string XiaShuUser = ZWL.DBUtility.DbHelperSQL.GetSHSLInt("select top 1 XiaShuUser from ERPUser where UserName='******'");
        string SSTempSTR  = "";

        if (XiaShuUser != "全部")
        {
            SSTempSTR = "and UserName in(" + "'" + XiaShuUser.Replace(",", "','") + "'" + ")";
        }

        ZWL.BLL.ERPHuiBao MyModel = new ZWL.BLL.ERPHuiBao();
        GVData.DataSource = MyModel.GetList("TitleStr Like '%" + this.TextBox1.Text + "%' and UserName like '%" + this.TextBox2.Text + "%' " + SSTempSTR + " order by ID desc");
        GVData.DataBind();
        LabPageSum.Text     = Convert.ToString(GVData.PageCount);
        LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
        this.GoPage.Text    = LabCurrentPage.Text.ToString();
    }
예제 #12
0
파일: HuiBao.aspx.cs 프로젝트: cnbin/HLB
    public void DataBindToGridview()
    {
        ZWL.BLL.ERPHuiBao MyModel       = new ZWL.BLL.ERPHuiBao();
        ZWL.BLL.ERPBuMen  BuMenModel    = new ZWL.BLL.ERPBuMen();
        string            Department_ID = BuMenModel.GetList("BuMenName='" + ZWL.Common.PublicMethod.GetSessionValue("Department") + "'").Tables[0].Rows[0]["ID"].ToString();
        DataSet           ds            = MyModel.GetList("TitleStr Like '%" + this.TextBox1.Text + "%' and UserName='******'%" + this.TextBox1.Text + "%' and CHARINDEX('" + Department_ID + "',p_depart_ids)>0 order by ID desc");
        if (ds != null)
        {
            GVData.DataSource = ds;
            GVData.DataBind();
            LabPageSum.Text     = Convert.ToString(GVData.PageCount);
            LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
            this.GoPage.Text    = LabCurrentPage.Text.ToString();
        }
    }
예제 #13
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        ZWL.BLL.ERPHuiBao Model = new ZWL.BLL.ERPHuiBao();
        Model.ID          = int.Parse(Request.QueryString["ID"].ToString());
        Model.TitleStr    = this.TextBox1.Text;
        Model.ContentStr  = this.TxtContent.Text;
        Model.CanLookUser = this.TextBox2.Text;
        Model.TimeStr     = DateTime.Now;
        Model.FuJianStr   = ZWL.Common.PublicMethod.GetSessionValue("WenJianList");
        Model.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        Model.Update();

        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户修改工作汇报信息(" + this.TextBox1.Text + ")";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();

        ZWL.Common.MessageBox.ShowAndRedirect(this, "工作汇报修改成功!", "HuiBao.aspx");
    }
예제 #14
0
파일: HuiBaoM.aspx.cs 프로젝트: cnbin/HLB
    public void DataBindToGridview()
    {
        ZWL.BLL.ERPHuiBao MyModel = new ZWL.BLL.ERPHuiBao();
        DataTable dt = ZWL.DBUtility.DbHelperSQL.GetDataTable("select h.ID,h.TitleStr,h.SSBM,h.UserName,h.TimeStr,h.ZT,h.DDWL,u.TrueName as TrueName from hx_vERPHuiBao as h left join ERPUser as u on h.UserName=u.UserName where h.TitleStr Like '%" + this.TextBox1.Text + "%' and h.UserName='******' order by ID desc");

        foreach(DataRow R in dt.Rows) {
            if(R["TrueName"] == null) {
                R["TrueName"] = R["UserName"];
            }
        }

        if(dt != null)
        {
            GVData.DataSource = dt;
            GVData.DataBind();
            LabPageSum.Text = Convert.ToString(GVData.PageCount);
            LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
            this.GoPage.Text = LabCurrentPage.Text.ToString();
        }
      
    }
예제 #15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            //绑定页面数据
            ZWL.BLL.ERPHuiBao MyModel = new ZWL.BLL.ERPHuiBao();
            MyModel.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
            if (MyModel != null)
            {
                this.TextBox1.Text = MyModel.TitleStr;

                string CanLookUser = "";
                foreach (string C in MyModel.CanLookUser.Split(','))
                {
                    string CTrueName = ZWL.DBUtility.DbHelperSQL.GetSHSL("select [TrueName] from ERPUser where [UserName]='" + C + "'");
                    if (!string.IsNullOrEmpty(CTrueName))
                    {
                        CanLookUser += CanLookUser == "" ? CTrueName : "," + CTrueName;
                    }
                    else
                    {
                        CanLookUser += CanLookUser == "" ? C : "," + C;
                    }
                }

                this.TextBox2.Text   = CanLookUser; //显示真实姓名
                this.TxtContent.Text = MyModel.ContentStr;
                this.TextBox3.Text   = MyModel.DDWL;
                //Label1.Text = MyModel.ZT;
            }


            ZWL.Common.PublicMethod.SetSessionValue("WenJianList", MyModel.FuJianStr);
            ZWL.Common.PublicMethod.BindDDL(this.CheckBoxList1, ZWL.Common.PublicMethod.GetSessionValue("WenJianList"));
            ReturnInput.Value = Request.UrlReferrer.ToString() == null ? "../WorkPlan/HuiBaoM.aspx" : Request.UrlReferrer.ToString();
        }
    }
예제 #16
0
파일: HuiBaoM.aspx.cs 프로젝트: cnbin/HLB
 public static string GetWarning() {
     string res = "";
     ZWL.BLL.ERPHuiBao MyModel = new ZWL.BLL.ERPHuiBao();
     res = MyModel.GetListByUserNameTitleStr(ZWL.Common.PublicMethod.GetSessionValue("UserName"), "");
     return res;
 }