Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                bool showAll = true;
                if (SysObj.IfShowAll("人事考核", Session["currentUserId"], "") == false)
                {
                    ViewState["showAll"] = false;
                    showAll = false;
                }
                var user    = new List <VAN_OA.Model.User>();
                var userSer = new VAN_OA.Dal.SysUserService();
                if (showAll == true)
                {
                    user = userSer.getAllUserByLoginName("");
                    user.Insert(0, new VAN_OA.Model.User()
                    {
                        LoginName = "全部", Id = -1
                    });
                }

                else
                {
                    var model = Session["userInfo"] as User;
                    user.Insert(0, model);
                }

                ddlUser.DataSource = user;
                ddlUser.DataBind();
                ddlUser.DataTextField  = "LoginName";
                ddlUser.DataValueField = "Id";

                ds = new DataSet();
                ds.Tables.Add(new DataTable());
                ds.Tables.Add(new DataTable());
            }
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                TB_CompanyService comSer = new TB_CompanyService();
                var comList = comSer.GetListArray("");
                foreach (var m in comList)
                {
                    m.ComCode += "," + m.ComSimpName;
                }
                comList.Insert(0, new VAN_OA.Model.BaseInfo.TB_Company()
                {
                    ComCode = "-1", ComName = "全部"
                });
                ddlCompany.DataSource = comList;
                ddlCompany.DataBind();

                bool showAll = true;
                if (SysObj.IfShowAll("销售月考核", Session["currentUserId"], "ShowAll") == false)
                {
                    ViewState["showAll"] = false;
                    showAll = false;
                }

                bool WFScanDepartList = true;
                if (showAll == false && VAN_OA.JXC.SysObj.IfShowAll("销售月考核", Session["currentUserId"], "WFScanDepartList") == true)
                {
                    ViewState["WFScanDepartList"] = false;
                    WFScanDepartList = false;
                }

                List <VAN_OA.Model.User>  user    = new List <VAN_OA.Model.User>();
                VAN_OA.Dal.SysUserService userSer = new VAN_OA.Dal.SysUserService();
                if (showAll == true)
                {
                    user = userSer.getAllUserByPOList();
                    user.Insert(0, new VAN_OA.Model.User()
                    {
                        LoginName = "全部", Id = -1
                    });
                }
                else if (WFScanDepartList == true)
                {
                    user = userSer.getAllUserByLoginName(string.Format(" and loginIPosition in (select loginIPosition from tb_User where id={0}) and loginIPosition<>''", Session["currentUserId"]));
                    user.Insert(0, new VAN_OA.Model.User()
                    {
                        LoginName = "全部", Id = 0
                    });
                }
                else
                {
                    var model = Session["userInfo"] as User;
                    user.Insert(0, model);
                }
                ddlUser.DataSource = user;
                ddlUser.DataBind();
                ddlUser.DataTextField  = "LoginName";
                ddlUser.DataValueField = "Id";

                ds = new DataSet();
                ds.Tables.Add(new DataTable());
                ds.Tables.Add(new DataTable());
                ds.Tables.Add(new DataTable());
                ds.Tables.Add(new DataTable());
                ds.Tables.Add(new DataTable());
                ds.Tables.Add(new DataTable());
                ds.Tables.Add(new DataTable());
                ds.Tables.Add(new DataTable());
                ds.Tables.Add(new DataTable());
            }
        }
Exemple #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                TB_ModelService modelService = new TB_ModelService();
                var             _modelList   = modelService.GetListArray("");
                _modelList.Insert(0, new TB_Model {
                    Id = -1, ModelName = "全部"
                });
                ddlModel.DataSource = _modelList;
                ddlModel.DataBind();
                ddlModel.DataTextField  = "ModelName";
                ddlModel.DataValueField = "ModelName";

                TB_CompanyService comSer = new TB_CompanyService();
                var comList = comSer.GetListArray("");
                foreach (var m in comList)
                {
                    m.ComSimpName += "," + m.Id + "," + m.ComCode;
                }
                comList.Insert(0, new VAN_OA.Model.BaseInfo.TB_Company()
                {
                    ComSimpName = "-1", ComName = "全部"
                });
                ddlCompany.DataSource = comList;
                ddlCompany.DataBind();

                //主单
                var pOOrderList = new List <JXC_REPORTTotal>();
                gvMain.DataSource = pOOrderList;
                gvMain.DataBind();

                bool showAll = true;
                if (SysObj.IfShowAll("销售退货损差表", Session["currentUserId"], "") == false)
                {
                    ViewState["showAll"] = false;
                    showAll = false;
                }



                bool WFScanDepartList = true;
                if (showAll == false && SysObj.IfShowAll("销售退货损差表", Session["currentUserId"], "WFScanDepartList") == true)
                {
                    ViewState["WFScanDepartList"] = false;
                    WFScanDepartList = false;
                }

                var user    = new List <User>();
                var userSer = new Dal.SysUserService();
                if (showAll)
                {
                    user = userSer.getAllUserByPOList();
                    user.Insert(0, new User()
                    {
                        LoginName = "全部", Id = -1
                    });
                }
                else if (WFScanDepartList)
                {
                    user = userSer.getAllUserByLoginName(string.Format(" and loginIPosition in (select loginIPosition from tb_User where id={0}) and loginIPosition<>''", Session["currentUserId"]));
                    user.Insert(0, new User()
                    {
                        LoginName = "全部", Id = 0
                    });
                }
                else
                {
                    var model = Session["userInfo"] as User;
                    user.Insert(0, model);
                }

                ddlUser.DataSource = user;
                ddlUser.DataBind();
                ddlUser.DataTextField  = "LoginName";
                ddlUser.DataValueField = "Id";
                if (Request["PONo"] != null)
                {
                    txtPONo.Text = Request["PONo"];
                    Show();
                }
            }
        }