コード例 #1
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();
                List <VAN_OA.Model.User>  user    = new List <VAN_OA.Model.User>();
                VAN_OA.Dal.SysUserService userSer = new VAN_OA.Dal.SysUserService();
                user = userSer.getAllUserByPOList();
                user.Insert(0, new VAN_OA.Model.User()
                {
                    LoginName = "全部", Id = -1
                });

                ddlUser.DataSource = user;
                ddlUser.DataBind();
                ddlUser.DataTextField  = "LoginName";
                ddlUser.DataValueField = "Id";
            }
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                List <User> users = new List <User>();
                this.gvList.DataSource = users;
                this.gvList.DataBind();

                TB_CompanyService comSer = new TB_CompanyService();

                var comList = comSer.GetListArray("");
                comList.Insert(0, new VAN_OA.Model.BaseInfo.TB_Company()
                {
                    ComCode = "全部", ComName = "全部"
                });
                ddlCompany.DataSource = comList;
                ddlCompany.DataBind();


                var dt = DBHelp.getDataTable("select loginIPosition from tb_User group by loginIPosition ");
                ddlDepartment.Items.Add(new ListItem("全部"));
                foreach (DataRow dr in dt.Rows)
                {
                    ddlDepartment.Items.Add(new ListItem(dr[0].ToString()));
                }
            }
        }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                for (int i = 2012; i <= DateTime.Now.Year; i++)
                {
                    ddlYear.Items.Add(new ListItem {
                        Value = i.ToString(), Text = i.ToString()
                    });
                }
                ddlYear.SelectedValue = (DateTime.Now.Year - 1).ToString();
                TB_CompanyService comSer = new TB_CompanyService();

                var comList = comSer.GetListArray("");
                ddlCompany.DataSource = comList;
                ddlCompany.DataBind();

//                string sql = string.Format(@"select COUNT(*) from role_sys_form left join sys_Object on sys_Object.FormID=role_sys_form.sys_form_Id and sys_Object.roleId=role_sys_form.role_Id and textName='公共费用-可修改保存'
//where  role_Id in (select roleId from Role_User where userId={0}) and sys_form_Id in(select formID from sys_form where displayName='项目结算') and sys_Object.AutoID is not null", Session["currentUserId"]);
//                if (Convert.ToInt32(DBHelp.ExeScalar(sql)) > 0)
                if (NewShowAll_textName("项目结算", "公共费用-可修改保存") == false)
                {
                    btnSave.Visible = false;
                }
            }
        }
コード例 #4
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();
                //主单
                List <Sell_OrderInHouse> pOOrderList = new List <Sell_OrderInHouse>();
                this.gvMain.DataSource = pOOrderList;
                this.gvMain.DataBind();

                //子单
                List <Sell_OrderInHouses> orders = new List <Sell_OrderInHouses>();
                gvList.DataSource = orders;
                gvList.DataBind();
                List <VAN_OA.Model.User>  user    = new List <VAN_OA.Model.User>();
                VAN_OA.Dal.SysUserService userSer = new VAN_OA.Dal.SysUserService();
                if (QuanXian_ShowAll(SysObj.Sell_OrderInHouseList) == false)
                {
                    ViewState["showAll"] = false;
                    var model = Session["userInfo"] as User;
                    user.Insert(0, model);
                }
                else
                {
                    user = userSer.getAllUserByPOList();
                    user.Insert(0, new VAN_OA.Model.User()
                    {
                        LoginName = "全部", Id = -1
                    });
                }
                ddlUser.DataSource = user;
                ddlUser.DataBind();
                ddlUser.DataTextField  = "LoginName";
                ddlUser.DataValueField = "Id";
            }
        }
コード例 #5
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();
                List <InvoiceReport> invoiceList = new List <InvoiceReport>();

                this.gvList.DataSource = invoiceList;
                this.gvList.DataBind();

                txtPOFrom.Text = DateTime.Now.AddYears(-1).Year + "-1-1";

                var user    = new List <VAN_OA.Model.User>();
                var userSer = new VAN_OA.Dal.SysUserService();
                user = userSer.getAllUserByPOList();
                user.Insert(0, new VAN_OA.Model.User()
                {
                    LoginName = "全部", Id = -1
                });
                ddlUser.DataSource = user;
                ddlUser.DataBind();
                ddlUser.DataTextField  = "LoginName";
                ddlUser.DataValueField = "Id";



//                string sql = string.Format(@"select COUNT(*) from role_sys_form left join sys_Object on sys_Object.FormID=role_sys_form.sys_form_Id and sys_Object.roleId=role_sys_form.role_Id and textName='记录'
//where  role_Id in (select roleId from Role_User where userId={0}) and sys_form_Id in(select formID from sys_form where displayName='到款对比') and sys_Object.AutoID is not null", Session["currentUserId"]);
//                if (Convert.ToInt32(DBHelp.ExeScalar(sql)) > 0)
//                {
//                    lblQuanXian.Text = "1";
//                    gvList.Columns[6].Visible = false;
//                }
            }
        }
コード例 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["ElectronicInvoice"] != null)
                {
                    var model = Session["ElectronicInvoice"] as ElectronicInvoice;
                    txtCompanyName.Text      = model.Company;
                    txtRightCompanyName.Text = model.Company;

                    txtSupplierName.Text        = model.SupplierName;
                    txtRightSupplierName.Text   = model.SupplierName;
                    txtSupplierCardNo.Text      = model.SupplierBrandNo;
                    txtRightSupplierCardNo.Text = model.SupplierBrandNo;
                    txtBrandName.Text           = model.SupplierBrandName;
                    txtRightBrandName.Text      = model.SupplierBrandName;
                    txtNum.Text     = "¥" + model.ActPay.ToString("f2").Replace(".", "");
                    txtDaTotal.Text = RMBCapitalization.RMBAmount(Convert.ToDouble(model.ActPay));
                    txtUse.Text     = model.ProNo;
                    txtTotal.Text   = "¥" + string.Format("{0:n2}", model.ActPay);

                    TB_CompanyService companySer = new TB_CompanyService();
                    var companyModel             = companySer.GetListArray(string.Format(" ComName='{0}'", model.Company))[0];
                    txtCardNo.Text             = companyModel.KaHao;
                    txtRightCompanyCardNo.Text = companyModel.KaHao;

                    TB_SupplierInfoService supplierSer = new TB_SupplierInfoService();
                    var list = supplierSer.GetListArray(string.Format(" SupplierName='{0}'", model.SupplierName));
                    if (list.Count > 0)
                    {
                        var supplierModel = list[0];
                        txtBrandAddress.Text = (string.IsNullOrEmpty(supplierModel.Province) ? "        " : supplierModel.Province)
                                               + "  " + supplierModel.City;
                        txtRightBrandAddress.Text = (string.IsNullOrEmpty(supplierModel.Province) ? "        " : supplierModel.Province)
                                                    + "  " + supplierModel.City;
                    }
                    else
                    {
                        txtBrandAddress.Text      = "";
                        txtRightBrandAddress.Text = "";
                    }

                    if (!string.IsNullOrEmpty(model.Person))
                    {
                        var person = new Invoice_PersonService().GetListArray(string.Format(" name='{0}'", model.Person))[0];
                        txtId.Text         = person.CardNo;
                        txtRightPhone.Text = person.Phone;
                        txtPhone.Text      = person.Phone;
                    }
                }
            }
        }
コード例 #7
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.ComSimpName += "," + m.Id + "," + m.ComCode;
                }
                comList.Insert(0, new VAN_OA.Model.BaseInfo.TB_Company()
                {
                    ComSimpName = "-1", ComName = "全部"
                });

                for (int i = 2012; i <= DateTime.Now.Year; i++)
                {
                    ddlYear.Items.Add(new ListItem {
                        Value = i.ToString(), Text = i.ToString()
                    });
                }
                ddlYear.SelectedValue = (DateTime.Now.Year - 1).ToString();

//                string sql = string.Format(@"select COUNT(*) from role_sys_form left join sys_Object on sys_Object.FormID=role_sys_form.sys_form_Id and sys_Object.roleId=role_sys_form.role_Id and textName='结算明细表-可导出'
//where  role_Id in (select roleId from Role_User where userId={0}) and sys_form_Id in(select formID from sys_form where displayName='项目结算') and sys_Object.AutoID is not null", Session["currentUserId"]);
//                if (Convert.ToInt32(DBHelp.ExeScalar(sql)) > 0)
                if (NewShowAll_textName("项目结算", "结算明细表-可导出") == false)
                {
                    btnExcel.Visible = false;
                    Button2.Visible  = false;
                }
//                sql = string.Format(@"select COUNT(*) from role_sys_form left join sys_Object on sys_Object.FormID=role_sys_form.sys_form_Id and sys_Object.roleId=role_sys_form.role_Id and textName='结算明细表-查询全部'
//where  role_Id in (select roleId from Role_User where userId={0}) and sys_form_Id in(select formID from sys_form where displayName='项目结算') and sys_Object.AutoID is not null", Session["currentUserId"]);
//                if (Convert.ToInt32(DBHelp.ExeScalar(sql)) > 0)
                if (NewShowAll_textName("项目结算", "结算明细表-查询全部") == false)
                {
                    btnExcel.Visible = false;
                    var model = Session["userInfo"] as User;
                    var m     = comList.Find(t => t.ComCode == model.CompanyCode);
                    comList = new List <TB_Company>();
                    comList.Add(m);

                    user.Insert(0, model);
                    ddlUser.DataSource = user;
                    ddlUser.DataBind();
                    ddlUser.DataTextField  = "LoginName";
                    ddlUser.DataValueField = "Id";
                }
                ddlCompany.DataSource = comList;
                ddlCompany.DataBind();
            }
        }
コード例 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                for (int i = 2012; i <= DateTime.Now.Year; i++)
                {
                    ddlYear.Items.Add(new ListItem {
                        Value = i.ToString(), Text = i.ToString()
                    });
                }
                ddlYear.SelectedValue = (DateTime.Now.Year - 1).ToString();
                TB_CompanyService comSer = new TB_CompanyService();

                var comList = comSer.GetListArray("");
                comList.Insert(0, new TB_Company()
                {
                    ComName = "选择", Id = -1
                });
                ddlCompany.DataSource = comList;
                ddlCompany.DataBind();

                //                string sql = string.Format(@"select COUNT(*) from role_sys_form left join sys_Object on sys_Object.FormID=role_sys_form.sys_form_Id and sys_Object.roleId=role_sys_form.role_Id and textName='个性费用-可修改保存'
                //where  role_Id in (select roleId from Role_User where userId={0}) and sys_form_Id in(select formID from sys_form where displayName='项目结算') and sys_Object.AutoID is not null", Session["currentUserId"]);
                //                if (Convert.ToInt32(DBHelp.ExeScalar(sql)) > 0)
                if (NewShowAll_textName("项目结算", "个性费用-可修改保存") == false)
                {
                    btnSave.Visible = false;
                }
                List <TB_BasePoType> basePoTypeList = new TB_BasePoTypeService().GetListArray("");
                cbListPoType.DataSource = basePoTypeList;
                cbListPoType.DataBind();
                cbListPoType.DataTextField  = "BasePoType";
                cbListPoType.DataValueField = "Id";

                TB_ProjectCostService _projectCostService = new TB_ProjectCostService();
                var projectCosts = _projectCostService.GetListArray("");
                if (projectCosts.Count > 0)
                {
                    var model = projectCosts[0];
                    txtZhangQi.Text    = model.ZhangQi.ToString();
                    txtCeSuanDian.Text = model.CeSuanDian.ToString();
                    txtMonthLiLv.Text  = model.MonthLiLv.ToString();
                }

                GetJieSuanDate();
            }
        }
コード例 #9
0
ファイル: EI_InCome.aspx.cs プロジェクト: liankong110/VAN_OA
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["ElectronicInvoice"] != null)
            {
                var model = Session["ElectronicInvoice"] as ElectronicInvoice;
                txtDate.Text = string.Format("{0:yyyy     MM     dd}", DateTime.Now);

                txtSupplierName.Text      = model.SupplierName;
                txtSupplierCardNo.Text    = model.SupplierBrandNo;
                txtSupplierBrandName.Text = model.SupplierBrandName;
                txtNum.Text     = "¥" + model.ActPay.ToString("f2").Replace(".", "");
                txtDaTotal.Text = RMBCapitalization.RMBAmount(Convert.ToDouble(model.ActPay.ToString("f2")));
                txtUse.Text     = model.ProNo;

                TB_CompanyService companySer = new TB_CompanyService();
                var companyModel             = companySer.GetListArray(string.Format(" ComName='{0}'", model.Company))[0];
                txtCompanyName.Text      = model.Company;
                txtCompanyCardNo.Text    = companyModel.KaHao;
                txtCompanyBrandName.Text = companyModel.KaiHuHang;
            }
        }
コード例 #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                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();

                VAN_OA.Dal.SysUserService userSer = new VAN_OA.Dal.SysUserService();
                var aeUsers = userSer.getAllUserByPOList();
                aeUsers.Insert(0, new VAN_OA.Model.User {
                    Id = -1, LoginName = "全部"
                });
                ddlAEUsers.DataSource = aeUsers;
                ddlAEUsers.DataBind();
                ddlAEUsers.DataTextField  = "LoginName";
                ddlAEUsers.DataValueField = "Id";

                if (Session["printUrl"] != null)
                {
                    string url = Session["printUrl"].ToString();
                    Session["printUrl"] = null;
                    Response.Write(string.Format("<script>window.open('{0}','_blank')</script>", url));
                }

                WebQuerySessin Sess = new WebQuerySessin(Query);

                A_ProInfoService proSer = new A_ProInfoService();
                List <A_ProInfo> pros   = this.proSer.GetListArray("");
                pros.Insert(0, new A_ProInfo());
                ddlProType.DataSource = pros;
                ddlProType.DataBind();

                ddlProType.DataTextField  = "pro_Type";
                ddlProType.DataValueField = "pro_Id";

                //加载SESSION中的数据
                if (Session[Query] != null)
                {
                    //QueryEForms
                    QuerySession.QueryEForm QEForm = Session[Query] as QuerySession.QueryEForm;
                    if (QEForm == null)
                    {
                        return;
                    }

                    if (QEForm.ProTypeId != 0)
                    {
                        try
                        {
                            ddlProType.Text = QEForm.ProTypeId.ToString();
                        }
                        catch (Exception)
                        {
                        }
                    }
                    if (QEForm.FromTime != "")
                    {
                        txtFrom.Text = QEForm.FromTime;
                    }

                    if (QEForm.ToTime != "")
                    {
                        txtTo.Text = QEForm.ToTime;
                    }


                    if (QEForm.Apper != "")
                    {
                        txtApper.Text = QEForm.Apper;
                    }

                    if (QEForm.WeiTuo != "")
                    {
                        txtWeiTuo.Text = QEForm.WeiTuo;
                    }
                    if (QEForm.E_No != "")
                    {
                        txtNo.Text = QEForm.E_No;
                    }

                    if (QEForm.E_No != "")
                    {
                        txtNo.Text = QEForm.E_No;
                    }

                    select();
                }
                else
                {
                    tb_EFormService eformSer  = new tb_EFormService();
                    List <tb_EForm> allEForms = eformSer.GetListArray_ToDo("", "", Convert.ToInt32(Session["currentUserId"]));

                    string allIds = "", proIds = "", fukuandan = "0,", yufukuandan = "0,";
                    for (int i = 0; i < allEForms.Count; i++)
                    {
                        allIds += allEForms[i].allE_id.ToString() + ",";
                        proIds += allEForms[i].proId.ToString() + ",";

                        if (allEForms[i].ProTyleName == "供应商付款单")
                        {
                            fukuandan += allEForms[i].allE_id + ",";
                        }
                        if (allEForms[i].ProTyleName == "供应商预付款单")
                        {
                            yufukuandan += allEForms[i].allE_id + ",";
                        }
                    }

                    allIds = allIds.Trim(',');
                    proIds = proIds.Trim(',');

                    fukuandan   = fukuandan.Trim(',');
                    yufukuandan = yufukuandan.Trim(',');


                    if (fukuandan != "" || yufukuandan != "")
                    {
                        var superSer = new TB_SupplierAdvancePaymentService();
                        SupplierInvoice_Names = superSer.GetSupplierName(yufukuandan, fukuandan);
                    }


                    if (allIds != "")
                    {
                        allAllWform = eformSer.GetView_AllEformList(proIds, allIds);
                    }

                    AspNetPager1.RecordCount = allEForms.Count;
                    this.gvList.PageIndex    = AspNetPager1.CurrentPageIndex - 1;
                    this.gvList.DataSource   = allEForms;
                    this.gvList.DataBind();
                }
            }
        }
コード例 #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                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();

                WebQuerySessin Sess = new WebQuerySessin("QueryEForms");
                gvList.PagerSettings.Mode = PagerButtons.NumericFirstLast;
                A_ProInfoService proSer = new A_ProInfoService();
                List <A_ProInfo> pros   = this.proSer.GetListArray(" A_ProInfo.pro_Id IN (20,21,22,24,12,31,32,27)");
                pros.Insert(0, new A_ProInfo());

                pros.Add(new A_ProInfo {
                    pro_Id = -2, pro_Type = " 销售发票+销售发票修改"
                });
                pros.Add(new A_ProInfo {
                    pro_Id = -3, pro_Type = "供应商付款单+供应商预付款单"
                });
                ddlProType.DataSource = pros;
                ddlProType.DataBind();

                ddlProType.DataTextField  = "pro_Type";
                ddlProType.DataValueField = "pro_Id";

                //加载SESSION中的数据
                if (Session["QueryEForms"] != null)
                {
                    //QueryEForms
                    QuerySession.QueryEForm QEForm = Session["QueryEForms"] as QuerySession.QueryEForm;
                    if (QEForm == null)
                    {
                        return;
                    }

                    if (QEForm.ProTypeId != 0)
                    {
                        try
                        {
                            ddlProType.Text = QEForm.ProTypeId.ToString();
                        }
                        catch (Exception)
                        {
                        }
                    }
                    if (QEForm.FromTime != "")
                    {
                        txtFrom.Text = QEForm.FromTime;
                    }

                    if (QEForm.ToTime != "")
                    {
                        txtTo.Text = QEForm.ToTime;
                    }
                    if (QEForm.State != "")
                    {
                        ddlState.Text = QEForm.State;
                    }

                    if (QEForm.Apper != "")
                    {
                        txtApper.Text = QEForm.Apper;
                    }

                    if (QEForm.Auper != "")
                    {
                        txtAuper.Text = QEForm.Auper;
                    }

                    if (QEForm.WatingAuper != "")
                    {
                        txtWating.Text = QEForm.WatingAuper;
                    }

                    if (QEForm.E_No != "")
                    {
                        txtNo.Text = QEForm.E_No;
                    }
                    if (QEForm.PONO != "")
                    {
                        txtPONo.Text = QEForm.PONO;
                    }
                    select();
                }
                else
                {
                    tb_EFormService eformSer  = new tb_EFormService();
                    List <tb_EForm> allEForms = new List <tb_EForm>();
                    AspNetPager1.RecordCount = allEForms.Count;
                    this.gvList.PageIndex    = AspNetPager1.CurrentPageIndex - 1;
                    this.gvList.DataSource   = allEForms;
                    this.gvList.DataBind();
                }
            }
        }
コード例 #12
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();

                List <TB_BasePoType> basePoTypeList = new TB_BasePoTypeService().GetListArray("");
                basePoTypeList.Insert(0, new TB_BasePoType {
                    BasePoType = "全部", Id = -1
                });
                ddlPOTyle.DataSource = basePoTypeList;
                ddlPOTyle.DataBind();
                ddlPOTyle.DataTextField  = "BasePoType";
                ddlPOTyle.DataValueField = "Id";

                GuestTypeBaseInfoService dal = new GuestTypeBaseInfoService();
                var dalList = dal.GetListArray("");
                dalList.Insert(0, new VAN_OA.Model.BaseInfo.GuestTypeBaseInfo {
                    GuestType = "全部"
                });
                ddlGuestTypeList.DataSource = dalList;
                ddlGuestTypeList.DataBind();
                ddlGuestTypeList.DataTextField  = "GuestType";
                ddlGuestTypeList.DataValueField = "GuestType";

                GuestProBaseInfoService guestProBaseInfodal = new GuestProBaseInfoService();
                var proList = guestProBaseInfodal.GetListArray("");
                proList.Insert(0, new VAN_OA.Model.BaseInfo.GuestProBaseInfo {
                    GuestPro = -2
                });
                ddlGuestProList.DataSource = proList;
                ddlGuestProList.DataBind();
                ddlGuestProList.DataTextField  = "GuestProString";
                ddlGuestProList.DataValueField = "GuestPro";

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



                bool showAll = true;
                if (QuanXian_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";

                //                string sql = string.Format(@"select COUNT(*) from role_sys_form left join sys_Object on sys_Object.FormID=role_sys_form.sys_form_Id and sys_Object.roleId=role_sys_form.role_Id and textName='可导出'
                //where  role_Id in (select roleId from Role_User where userId={0}) and sys_form_Id in(select formID from sys_form where displayName='销售报表汇总') and sys_Object.AutoID is not null", Session["currentUserId"]);
                //                if (Convert.ToInt32(DBHelp.ExeScalar(sql)) <= 0)
                if (NewShowAll_textName("工程技术派工统计报表", "可导出"))
                {
                    btnExcel.Visible = true;
                }
                else
                {
                    btnExcel.Visible = false;
                }

                if (!NewShowAll_textName("工程技术派工统计报表", "编辑"))
                {
                    gvMain.Columns[0].Visible = false;
                }

                string sql = string.Format("select loginName,ID from tb_User where loginIPosition='技术部' AND loginStatus='在职' and loginName<>'';");

                List <User> getUsers = userSer.getUserReportTos(sql);
                getUsers = getUsers.FindAll(T => string.IsNullOrEmpty(T.LoginName) == false);
                getUsers.Insert(0, new Model.User {
                    Id = -1, LoginName = "全部"
                });
                getUsers.Add(new User {
                    Id = -1000, LoginName = "其他"
                });
                ddlPaiGong.DataSource = getUsers;
                ddlPaiGong.DataBind();

                ddlPaiGong.DataTextField  = "LoginName";
                ddlPaiGong.DataValueField = "Id";

                if (Request["PONo"] != null)
                {
                    txtPONo.Text = Request["PONo"].ToString();

                    ddlIsSpecial.Text = "-1";
                    Show();
                }
            }
        }
コード例 #13
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 fpTypeBaseInfoService = new FpTypeBaseInfoService();
                gooQGooddList_1 = fpTypeBaseInfoService.GetListArray("");
                gooQGooddList_1.Insert(0, new FpTypeBaseInfo()
                {
                    FpType = "全部"
                });

                List <VAN_OA.Model.User>  user    = new List <VAN_OA.Model.User>();
                VAN_OA.Dal.SysUserService userSer = new VAN_OA.Dal.SysUserService();
                if (NewShowAll_textName("采购订单列表2", "查看所有") == false)
                {
                    ViewState["showAll"] = false;
                    var model = Session["userInfo"] as User;
                    user.Insert(0, model);
                }
                else
                {
                    user = userSer.getAllUserByPOList();
                    user.Insert(0, new VAN_OA.Model.User()
                    {
                        LoginName = "全部", Id = -1
                    });
                }
                ddlUser.DataSource = user;
                ddlUser.DataBind();
                ddlUser.DataTextField  = "LoginName";
                ddlUser.DataValueField = "Id";
                if (NewShowAll_textName("采购订单列表2", "禁止含税设置") == false)
                {
                    gvMain.Columns[0].Visible = false;
                    btnSave.Visible           = false;
                }
                else
                {
                    gvMain.Columns[1].Visible = false;
                }

                if (NewShowAll_textName("采购订单列表2", "可导出") == false)
                {
                    btnExcel.Visible = false;
                }

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

                //发票类型
                dllSelectFPstye.DataSource     = gooQGooddList_1;
                dllSelectFPstye.DataTextField  = "FpType";
                dllSelectFPstye.DataValueField = "FpType";
                dllSelectFPstye.DataBind();
                //
            }
        }
コード例 #14
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();
                //主单
                List <JXC_REPORTTotal> pOOrderList = new List <JXC_REPORTTotal>();
                this.gvMain.DataSource = pOOrderList;
                this.gvMain.DataBind();

                //if (VAN_OA.JXC.SysObj.IfShowAll(SysObj.JXC_REPORTTotalList, Session["currentUserId"]) == false)
                //{
                //    ViewState["showAll"] = false;
                //}
                //System.Wen.HttpUtility.HtmlEncode.

                List <VAN_OA.Model.User>  user    = new List <VAN_OA.Model.User>();
                VAN_OA.Dal.SysUserService userSer = new VAN_OA.Dal.SysUserService();
                if (QuanXian_ShowAll("项目费用汇总统计") == false)
                {
                    ViewState["showAll"] = false;
                    var model = Session["userInfo"] as User;
                    user.Insert(0, model);
                }
                else
                {
                    user = userSer.getAllUserByPOList();
                    user.Insert(0, new VAN_OA.Model.User()
                    {
                        LoginName = "全部", Id = -1
                    });
                }
                ddlUser.DataSource = user;
                ddlUser.DataBind();
                ddlUser.DataTextField  = "LoginName";
                ddlUser.DataValueField = "Id";



                if (Request["PONo"] != null)
                {
                    txtPONo.Text = Request["PONo"].ToString();
                    Show();
                }
            }
        }
コード例 #15
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";

                //加载基本信息
                ddlNumber.Items.Add(new ListItem {
                    Text = "全部", Value = ""
                });
                ddlRow.Items.Add(new ListItem {
                    Text = "全部", Value = ""
                });
                ddlCol.Items.Add(new ListItem {
                    Text = "全部", Value = ""
                });
                //货架号:1.全部  缺省 2….51 1,..50
                for (int i = 1; i < 51; i++)
                {
                    ddlNumber.Items.Add(new ListItem {
                        Text = i.ToString(), Value = i.ToString()
                    });
                    //层数:1.全部  缺省 2….21 1,2,3…20
                    //部位:1.全部  缺省 2….21 1,2,3…20
                    if (i <= 21)
                    {
                        ddlRow.Items.Add(new ListItem {
                            Text = i.ToString(), Value = i.ToString()
                        });
                        ddlCol.Items.Add(new ListItem {
                            Text = i.ToString(), Value = i.ToString()
                        });
                    }
                }

                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();

                Dal.BaseInfo.TB_HouseInfoService   houseSer  = new VAN_OA.Dal.BaseInfo.TB_HouseInfoService();
                List <Model.BaseInfo.TB_HouseInfo> houseList = houseSer.GetListArray("");
                houseList.Insert(0, new VAN_OA.Model.BaseInfo.TB_HouseInfo());
                ddlHouse.DataSource = houseList;
                ddlHouse.DataBind();
                ddlHouse.DataTextField  = "houseName";
                ddlHouse.DataValueField = "id";

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

                //子单
                List <CAI_OrderInHouses> orders = new List <CAI_OrderInHouses>();
                gvList.DataSource = orders;
                gvList.DataBind();
                List <VAN_OA.Model.User>  user    = new List <VAN_OA.Model.User>();
                VAN_OA.Dal.SysUserService userSer = new VAN_OA.Dal.SysUserService();
                if (QuanXian_ShowAll(SysObj.CAI_OrderInHouseList) == false)
                {
                    ViewState["showAll"] = false;
                    var model = Session["userInfo"] as User;
                    user.Insert(0, model);
                }
                else
                {
                    user = userSer.getAllUserByPOList();
                    user.Insert(0, new VAN_OA.Model.User()
                    {
                        LoginName = "全部", Id = -1
                    });
                }
                ddlUser.DataSource = user;
                ddlUser.DataBind();
                ddlUser.DataTextField  = "LoginName";
                ddlUser.DataValueField = "Id";
            }
        }
コード例 #16
0
ファイル: KPI_Sell.aspx.cs プロジェクト: liankong110/VAN_OA
        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.ComSimpName += "," + m.Id + "," + m.ComCode;
                }
                comList.Insert(0, new VAN_OA.Model.BaseInfo.TB_Company()
                {
                    ComSimpName = "-1", ComName = "全部"
                });
                ddlCompany.DataSource = comList;
                ddlCompany.DataBind();

                //txtStartTime.Text = (DateTime.Now.Year - 1) + "-1-1";


                List <TB_BasePoType> basePoTypeList  = new TB_BasePoTypeService().GetListArray("");
                List <TB_BasePoType> basePoTypeList1 = new TB_BasePoTypeService().GetListArray("");
                cbKaoList.DataSource = basePoTypeList1;
                cbKaoList.DataBind();
                cbKaoList.DataTextField  = "BasePoType";
                cbKaoList.DataValueField = "Id";

                basePoTypeList.Insert(0, new TB_BasePoType {
                    BasePoType = "全部", Id = -1
                });
                ddlPOTyle.DataSource = basePoTypeList;
                ddlPOTyle.DataBind();
                ddlPOTyle.DataTextField  = "BasePoType";
                ddlPOTyle.DataValueField = "Id";



                GuestTypeBaseInfoService dal = new GuestTypeBaseInfoService();
                var dalList = dal.GetListArray("");
                dalList.Insert(0, new VAN_OA.Model.BaseInfo.GuestTypeBaseInfo {
                    GuestType = "全部"
                });
                ddlGuestTypeList.DataSource = dalList;
                ddlGuestTypeList.DataBind();
                ddlGuestTypeList.DataTextField  = "GuestType";
                ddlGuestTypeList.DataValueField = "GuestType";

                GuestProBaseInfoService guestProBaseInfodal = new GuestProBaseInfoService();
                var proList = guestProBaseInfodal.GetListArray("");
                proList.Insert(0, new VAN_OA.Model.BaseInfo.GuestProBaseInfo {
                    GuestPro = -2
                });
                ddlGuestProList.DataSource = proList;
                ddlGuestProList.DataBind();
                ddlGuestProList.DataTextField  = "GuestProString";
                ddlGuestProList.DataValueField = "GuestPro";

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

                //if (VAN_OA.JXC.SysObj.IfShowAll(SysObj.JXC_REPORTTotalList, Session["currentUserId"]) == false)
                //{
                //    ViewState["showAll"] = false;
                //}


                bool showAll = true;
                if (QuanXian_ShowAll("销售KPI 量化指标") == false)
                {
                    ViewState["showAll"] = false;
                    showAll = false;
                }



                bool WFScanDepartList = true;
                if (showAll == false && VAN_OA.JXC.SysObj.IfShowAll("销售KPI 量化指标", 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";

                if (Request["PONo"] != null)
                {
                    txtPONo.Text = Request["PONo"].ToString();
                    Show();
                }
            }
        }
コード例 #17
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();
                List <TB_BasePoType> basePoTypeList = new TB_BasePoTypeService().GetListArray("");
                basePoTypeList.Insert(0, new TB_BasePoType {
                    BasePoType = "全部", Id = -1
                });
                ddlPOTyle.DataSource = basePoTypeList;
                ddlPOTyle.DataBind();
                ddlPOTyle.DataTextField  = "BasePoType";
                ddlPOTyle.DataValueField = "Id";

                TB_GoodsTypeService typeSer = new TB_GoodsTypeService();
                List <TB_GoodsType> allType = typeSer.GetListArray("");
                allType.Insert(0, new TB_GoodsType());
                ddlGoodType.DataSource = allType;
                ddlGoodType.DataBind();
                ddlGoodType.DataTextField  = "GoodTypeName";
                ddlGoodType.DataValueField = "GoodTypeName";


                TB_GoodsSmTypeService goodsSmTypeSer  = new TB_GoodsSmTypeService();
                List <TB_GoodsSmType> goodsSmTypeList = goodsSmTypeSer.GetListArrayToddl("");
                goodsSmTypeList.Insert(0, new TB_GoodsSmType());
                ddlGoodSmType.DataSource = goodsSmTypeList;
                ddlGoodSmType.DataBind();
                ddlGoodSmType.DataTextField  = "GoodTypeSmName";
                ddlGoodSmType.DataValueField = "GoodTypeSmName";


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


                bool showAll = true;
                if (QuanXian_ShowAll(SysObj.JXC_REPORTList) == false)
                {
                    ViewState["showAll"] = false;
                    showAll = false;
                }



                bool WFScanDepartList = true;
                if (showAll == false && VAN_OA.JXC.SysObj.IfShowAll(SysObj.JXC_REPORTList, 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";

                if (Request["IsSpecial"] != null)
                {
                    ddlIsSpecial.Text = Request["IsSpecial"].ToString();
                }
                if (Request["PONo"] != null)
                {
                    txtPONo.Text = Request["PONo"].ToString();
                    Show();
                }
            }
        }
コード例 #18
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();
                if (Session["currentUserId"] != null)
                {
                    //List<VAN_OA.Model.User> user = new List<VAN_OA.Model.User>();
                    //VAN_OA.Dal.SysUserService userSer = new VAN_OA.Dal.SysUserService();
                    //if (VAN_OA.JXC.SysObj.IfShowAll("项目未采购清单", Session["currentUserId"], "ShowAll") == false)
                    //{
                    //    ViewState["showAll"] = false;
                    //    var model = Session["userInfo"] as User;
                    //    user.Insert(0, model);
                    //}
                    //else
                    //{
                    //    user = userSer.getAllUserByPOList();
                    //    user.Insert(0, new VAN_OA.Model.User() {LoginName = "全部", Id = -1});
                    //}

                    bool showAll = true;
                    if (QuanXian_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";

                    List <CaiNotRuView> list = new List <CaiNotRuView>();
                    gvMain.DataSource = list;
                    gvMain.DataBind();

                    if (Request["PONo"] != null)
                    {
                        txtPONo.Text = Request["PONo"].ToString();

                        Show();
                    }
                }
            }
        }
コード例 #19
0
ファイル: WFUserCmd.aspx.cs プロジェクト: liankong110/VAN_OA
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                if (NewShowAll_textName("用户信息", "可记录权限"))
                {
                    ViewState["ScanSpecGuests"] = true;
                }
                else
                {
                    ViewState["ScanSpecGuests"] = false;
                }

                List <Role> roles1 = this.roleSer.getAllRoles("");
                roles1.Insert(0, new Role {
                    RoleName = ""
                });
                this.ddlDeptment.DataTextField  = "RoleName";
                this.ddlDeptment.DataValueField = "RoleName";
                this.ddlDeptment.DataSource     = roles1;
                this.ddlDeptment.DataBind();

                TB_CompanyService comSer = new TB_CompanyService();

                var comList = comSer.GetListArray("");
                comList.Insert(0, new VAN_OA.Model.BaseInfo.TB_Company()
                {
                    ComCode = "", ComName = ""
                });
                ddlCompany.DataSource = comList;

                ddlCompany.DataBind();


                ddlSheBao.DataSource = comList;
                ddlSheBao.DataBind();

                List <Role> roles = new List <Role>();
                if (base.Request["UserId"] != null)
                {
                    this.btnAdd.Visible = false;
                    User user = this.UserSer.getUserByUserId(Convert.ToInt32(base.Request["UserId"]));
                    this.txtNo.Text = user.LoginUserNO;
                    //this.txtAddress.Text = user.LoginAddress;
                    //this.txtCardNo.Text = user.LoginRemark;
                    this.txtCreateTime.Text = user.LoginCreateTime.ToShortDateString();
                    this.ddlDeptment.Text   = user.LoginIPosition;

                    txtPwd.Attributes.Add("Value", user.LoginPwd);
                    lblPwd.Text           = user.LoginPwd;
                    this.txtPwd.Text      = user.LoginPwd;
                    this.txtTel.Text      = user.LoginPhone;
                    this.txtUserid.Text   = user.LoginId;
                    this.txtUserName.Text = user.LoginName;
                    this.ddlState.Text    = user.LoginStatus;
                    this.ddlSex.Text      = user.LoginTmpPwd;
                    ddlCompany.Text       = user.CompanyCode;
                    try
                    {
                        ddlSheBao.Text = user.SheBaoCode;
                    }
                    catch (Exception)
                    {
                    }
                    txtZhiwu.Text           = user.Zhiwu;
                    cbIsSpecialUser.Checked = user.IsSpecialUser;
                    txtEMail.Text           = user.LoginMemo;
                    if (user.ReportTo != 0)
                    {
                        ddlReportTo.Text = user.ReportTo.ToString();
                    }


                    txtMobile.Text     = user.Mobile;
                    txtCardNO.Text     = user.CardNO;
                    txtCityNo.Text     = user.CityNo;
                    ddlEducation.Text  = user.Education;
                    txtSchool.Text     = user.School;
                    txtSchoolDate.Text = user.SchoolDate;
                    txtTitle.Text      = user.Title;
                    ddlPolitical.Text  = user.Political;
                    txtHomeAdd.Text    = user.HomeAdd;
                    txtWorkDate.Text   = user.WorkDate;

                    roles = this.roleSer.getAllRolesByUseridExAdmin(user.Id);

                    string checkRole = string.Format("select count(*) from Role_User where roleId=1 and UserId=" + Session["currentUserId"].ToString());

                    bool ifAdmin = Convert.ToInt32(DBHelp.ExeScalar(checkRole)) >= 1 ? true : false;
                    if (ifAdmin)
                    {
                        txtPwd.Enabled = true;
                    }
                    else
                    {
                        txtPwd.Enabled = false;
                    }
                }
                else
                {
                    roles = this.roleSer.getAllRolesByUseridExAdmin(0);
                    this.btnUpdate.Visible = false;
                }
                IniData();
                this.gvList.DataSource = roles;
                this.gvList.DataBind();
            }
        }
コード例 #20
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";

                if (Session["currentUserId"] != null)
                {
                    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();

                    List <VAN_OA.Model.User>  user    = new List <VAN_OA.Model.User>();
                    VAN_OA.Dal.SysUserService userSer = new VAN_OA.Dal.SysUserService();
                    if (VAN_OA.JXC.SysObj.IfShowAll("入库未出清单", Session["currentUserId"], "ShowAll") == false)
                    {
                        ViewState["showAll"] = false;
                        var model = Session["userInfo"] as User;
                        user.Insert(0, model);
                    }
                    else
                    {
                        user = userSer.getAllUserByPOList();
                        user.Insert(0, new VAN_OA.Model.User()
                        {
                            LoginName = "全部", Id = -1
                        });
                    }
                    ddlUser.DataSource = user;
                    ddlUser.DataBind();
                    ddlUser.DataTextField  = "LoginName";
                    ddlUser.DataValueField = "Id";

                    List <RuSellReport> list = new List <RuSellReport>();
                    gvMain.DataSource = list;
                    gvMain.DataBind();


                    if (Request["PONo"] != null)
                    {
                        txtPONo.Text     = Request["PONo"].ToString();
                        ddlPoType.Text   = "2";
                        cbRuZero.Checked = true;
                        Show();
                    }

                    if (Request["X"] != null)
                    {
                        Show();
                    }
                }
            }
        }
コード例 #21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                _modelList = modelService.GetListArray("");
                _modelList.Insert(0, new TB_Model {
                    Id = -1, ModelName = "全部"
                });
                ddlModel.DataSource = _modelList;
                ddlModel.DataBind();
                ddlModel.DataTextField  = "ModelName";
                ddlModel.DataValueField = "ModelName";

                this.gvModel.DataSource = modelService.GetListArray("");;
                this.gvModel.DataBind();

                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();
                if (NewShowAll_textName("项目归类", "关闭可编辑") == false)
                {
                    ViewState["isCloseEdist"] = false;
                    btnSaveIsClose.Visible    = false;
                }
                if (NewShowAll_textName("项目归类", "特殊可编辑") == false)
                {
                    ViewState["isSpecialEdit"] = false;
                }
                if (NewShowAll_textName("项目归类", "项目模型可编辑") == false)
                {
                    ViewState["isModelEdit"] = false;
                }
                if (NewShowAll_textName("项目归类", "项目类型可编辑") == false)
                {
                    ViewState["isPOType"] = false;
                }
                if (NewShowAll_textName("项目归类", "含税可编辑") == false)
                {
                    ViewState["isFaxEdist"] = false;
                }
                if (NewShowAll_textName("项目归类", "发票类型可编辑") == false)
                {
                    ViewState["isFPTypeEdist"] = false;
                }
                if (NewShowAll_textName("项目归类", "选中可编辑") == false)
                {
                    ViewState["cbIsSelected"] = false;
                    btnIsSelected.Visible     = false;
                }
                if (NewShowAll_textName("项目归类", "结算选中可编辑") == false)
                {
                    ViewState["IsJieIsSelected"] = false;
                    btnJieIsSelected.Visible     = false;
                }

                if (NewShowAll_textName("项目归类", "财务成本计量可编辑") == false)
                {
                    ViewState["isChengBenJiLiang"] = false;
                }
                if (NewShowAll_textName("项目归类", "计划完工天数可编辑") == false)
                {
                    ViewState["isPlanDays"] = false;
                }
                if (NewShowAll_textName("项目归类", "客户类型可编辑") == false)
                {
                    ViewState["isGuestType"] = false;
                    btnGuestType.Visible     = false;
                }
                if (NewShowAll_textName("项目归类", "客户属性可编辑") == false)
                {
                    ViewState["isGuestPro"] = false;
                    btnGuestPro.Visible     = false;
                }
                var user    = new List <Model.User>();
                var userSer = new Dal.SysUserService();

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

                if (QuanXian_ShowAll("项目归类") == false)
                {
                    ViewState["showAll"] = false;
                    var model = Session["userInfo"] as User;
                    user.Insert(0, model);
                }
                else
                {
                    user = userSer.getAllUserByPOList();
                    user.Insert(0, new VAN_OA.Model.User()
                    {
                        LoginName = "全部", Id = -1
                    });
                }
                ddlUser.DataSource = user;
                ddlUser.DataBind();
                ddlUser.DataTextField  = "LoginName";
                ddlUser.DataValueField = "Id";

                var fpTypeBaseInfoService        = new FpTypeBaseInfoService();
                List <FpTypeBaseInfo> fpTypeList = fpTypeBaseInfoService.GetListArray("");
                fpTypeList.Insert(0, new FpTypeBaseInfo {
                    FpType = "全部", Id = -1
                });
                fpTypeList.Add(new FpTypeBaseInfo {
                    Id = 999, FpType = ""
                });
                dllFPstye.DataSource = fpTypeList;
                dllFPstye.DataBind();
                dllFPstye.DataTextField  = "FpType";
                dllFPstye.DataValueField = "Id";

                dllFPstye.Items[fpTypeList.Count - 1].Attributes.Add("style", "background-color: red");

                List <FpTypeBaseInfo> newFpTypeList = new List <FpTypeBaseInfo>();
                foreach (var fp in fpTypeList)
                {
                    newFpTypeList.Add(new FpTypeBaseInfo {
                        Id = fp.Id, FpType = fp.FpType
                    });
                }

                newFpTypeList.Add(new FpTypeBaseInfo {
                    Id = 1000, FpType = "其他"
                });
                ddlFPType.DataSource = newFpTypeList;
                ddlFPType.DataBind();
                ddlFPType.DataTextField  = "FpType";
                ddlFPType.DataValueField = "Id";

                ddlFPType.Items[newFpTypeList.Count - 2].Attributes.Add("style", "background-color: red");


                List <TB_BasePoType> basePoTypeList = new TB_BasePoTypeService().GetListArray("");
                basePoTypeList.Insert(0, new TB_BasePoType {
                    BasePoType = "全部", Id = -1
                });
                ddlPOTyle.DataSource = basePoTypeList;
                ddlPOTyle.DataBind();
                ddlPOTyle.DataTextField  = "BasePoType";
                ddlPOTyle.DataValueField = "Id";

                GuestTypeBaseInfoService dal = new GuestTypeBaseInfoService();
                var dalList = dal.GetListArray("");
                dalList.Insert(0, new VAN_OA.Model.BaseInfo.GuestTypeBaseInfo {
                    GuestType = ""
                });
                dalList.Insert(0, new VAN_OA.Model.BaseInfo.GuestTypeBaseInfo {
                    GuestType = "全部"
                });

                ddlGuestTypeList.DataSource = dalList;
                ddlGuestTypeList.DataBind();
                ddlGuestTypeList.DataTextField  = "GuestType";
                ddlGuestTypeList.DataValueField = "GuestType";

                GuestProBaseInfoService guestProBaseInfodal = new GuestProBaseInfoService();
                var proList = guestProBaseInfodal.GetListArray("");
                proList.Insert(0, new VAN_OA.Model.BaseInfo.GuestProBaseInfo {
                    GuestPro = -1
                });
                proList.Insert(0, new VAN_OA.Model.BaseInfo.GuestProBaseInfo {
                    GuestPro = -2,
                });

                ddlGuestProList.DataSource = proList;
                ddlGuestProList.DataBind();
                ddlGuestProList.DataTextField  = "GuestProString";
                ddlGuestProList.DataValueField = "GuestPro";
            }
        }
コード例 #22
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();
                //主单
                List <Sell_OrderFP> pOOrderList = new List <Sell_OrderFP>();
                this.gvMain.DataSource = pOOrderList;
                this.gvMain.DataBind();

                //子单
                List <Sell_OrderFPs> orders = new List <Sell_OrderFPs>();
                gvList.DataSource = orders;
                gvList.DataBind();

                List <VAN_OA.Model.User>  user    = new List <VAN_OA.Model.User>();
                VAN_OA.Dal.SysUserService userSer = new VAN_OA.Dal.SysUserService();

                //                string sql = string.Format(@"select COUNT(*) from role_sys_form left join sys_Object on sys_Object.FormID=role_sys_form.sys_form_Id and sys_Object.roleId=role_sys_form.role_Id and textName='查看所有'
                //where  role_Id in (select roleId from Role_User where userId={0}) and sys_form_Id in(select formID from sys_form where displayName='销售发票列表') and sys_Object.AutoID is not null", Session["currentUserId"]);
                if (QuanXian_ShowAll("销售发票列表") == false)
                {
                    ViewState["showAll"] = false;
                    var model = Session["userInfo"] as User;
                    user.Insert(0, model);
                }
                else
                {
                    user = userSer.getAllUserByPOList();
                    user.Insert(0, new VAN_OA.Model.User()
                    {
                        LoginName = "全部", Id = -1
                    });
                }
                ddlUser.DataSource = user;
                ddlUser.DataBind();
                ddlUser.DataTextField  = "LoginName";
                ddlUser.DataValueField = "Id";

                //                string sql = string.Format(@"select COUNT(*) from role_sys_form left join sys_Object on sys_Object.FormID=role_sys_form.sys_form_Id and sys_Object.roleId=role_sys_form.role_Id and textName='不能编辑'
                //where  role_Id in (select roleId from Role_User where userId={0}) and sys_form_Id in(select formID from sys_form where displayName='销售发票列表') and sys_Object.AutoID is not null", Session["currentUserId"]);
                //                if (Convert.ToInt32(DBHelp.ExeScalar(sql)) <= 0)
                if (NewShowAll_textName("销售发票列表", "不能编辑") == false)
                {
                    gvMain.Columns[0].Visible = false;
                }
                if (NewShowAll_textName("销售发票列表", "删除") == false)
                {
                    gvMain.Columns[2].Visible = false;
                }
                //if (VAN_OA.JXC.SysObj.IfShowAll(SysObj.Sell_OrderPFList, Session["currentUserId"]) == false)
                //{
                //    ViewState["showAll"] = false;
                //}
                var fpTypeBaseInfoService        = new FpTypeBaseInfoService();
                List <FpTypeBaseInfo> fpTypeList = fpTypeBaseInfoService.GetListArray("");
                fpTypeList.Insert(0, new FpTypeBaseInfo {
                    FpType = "全部", Id = -1
                });
                fpTypeList.Add(new FpTypeBaseInfo {
                    Id = 999, FpType = ""
                });
                fpTypeList.Add(new FpTypeBaseInfo {
                    Id = 1000, FpType = "其他"
                });
                ddlFPType.DataSource = fpTypeList;
                ddlFPType.DataBind();
                ddlFPType.DataTextField  = "FpType";
                ddlFPType.DataValueField = "Id";
                ddlFPType.Items[fpTypeList.Count - 2].Attributes.Add("style", "background-color: red");

                GuestTypeBaseInfoService dal = new GuestTypeBaseInfoService();
                var dalList = dal.GetListArray("");
                dalList.Insert(0, new VAN_OA.Model.BaseInfo.GuestTypeBaseInfo {
                    GuestType = "全部"
                });
                ddlGuestTypeList.DataSource = dalList;
                ddlGuestTypeList.DataBind();
                ddlGuestTypeList.DataTextField  = "GuestType";
                ddlGuestTypeList.DataValueField = "GuestType";

                GuestProBaseInfoService guestProBaseInfodal = new GuestProBaseInfoService();
                var proList = guestProBaseInfodal.GetListArray("");
                proList.Insert(0, new VAN_OA.Model.BaseInfo.GuestProBaseInfo {
                    GuestPro = -2
                });
                ddlGuestProList.DataSource = proList;
                ddlGuestProList.DataBind();
                ddlGuestProList.DataTextField  = "GuestProString";
                ddlGuestProList.DataValueField = "GuestPro";

                if (Request["PONo"] != null)
                {
                    txtPONo.Text = Request["PONo"].ToString();
                    if (Request["Type"] != null)
                    {
                        ddlType.Text = Request["Type"].ToString();
                    }
                    Show();
                }

                if (Request["InvoiceNo"] != null)
                {
                    txtFPNo.Text = Request["InvoiceNo"].ToString();
                    Show();
                }
            }
        }
コード例 #23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                TB_CompanyService comSer = new TB_CompanyService();
                var comList = comSer.GetListArray("");
                comList.Add(new VAN_OA.Model.BaseInfo.TB_Company()
                {
                    ComName = "全部"
                });
                ddlCompany.DataSource = comList;
                ddlCompany.DataBind();

                if (Session["Company"] != null)
                {
                    ddlCompany.Text = Session["Company"].ToString();
                }
                bool showAll = true;
                if (QuanXian_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";
                if (Request["QuoteNo"] != null)
                {
                    txtProno.Text = Request["QuoteNo"];
                    Show();
                }
                else
                {
                    List <tb_QuotePrice> quotePriceList = new List <tb_QuotePrice>();
                    this.gvList.DataSource = quotePriceList;
                    this.gvList.DataBind();
                }
            }
        }
コード例 #24
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());
            }
        }
コード例 #25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                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();

                VAN_OA.Dal.SysUserService userSer = new VAN_OA.Dal.SysUserService();
                List <VAN_OA.Model.User>  user    = userSer.getAllUserByLoginName("");
                user.Insert(0, new VAN_OA.Model.User {
                    Id = -1, LoginName = "全部"
                });
                ddlUser.DataSource = user;
                ddlUser.DataBind();
                ddlUser.DataTextField  = "LoginName";
                ddlUser.DataValueField = "Id";
                var aeUsers = userSer.getAllUserByPOList();
                aeUsers.Insert(0, new VAN_OA.Model.User {
                    Id = -1, LoginName = "全部"
                });
                ddlAEUsers.DataSource = aeUsers;
                ddlAEUsers.DataBind();
                ddlAEUsers.DataTextField  = "LoginName";
                ddlAEUsers.DataValueField = "Id";

                #region 是否有删除功能
                if (Session["currentUserId"] != null)
                {
                    VAN_OA.Dal.TB_AdminDeleteService deleteSer = new VAN_OA.Dal.TB_AdminDeleteService();
                    if (deleteSer.CheckIsExistByUserId(Convert.ToInt32(Session["currentUserId"])) == false)
                    {
                        gvList.Columns[1].Visible = false;
                    }
                }
                #endregion


                WebQuerySessin Sess = new WebQuerySessin("QueryEForms");

                gvList.PagerSettings.Mode = PagerButtons.NumericFirstLast;


                A_ProInfoService proSer = new A_ProInfoService();
                List <A_ProInfo> pros   = this.proSer.GetListArray("");
                pros.Insert(0, new A_ProInfo());

                pros.Insert(pros.FindIndex(t => t.pro_Type == "销售发票"), new A_ProInfo {
                    pro_Id = -2, pro_Type = "销售发票+销售发票修改"
                });
                pros.Insert(pros.FindIndex(t => t.pro_Type == "销售发票") - 1, new A_ProInfo {
                    pro_Id = -3, pro_Type = "供应商付款单+供应商预付款单"
                });
                ddlProType.DataSource = pros;
                ddlProType.DataBind();

                ddlProType.DataTextField  = "pro_Type";
                ddlProType.DataValueField = "pro_Id";

                //加载SESSION中的数据
                if (Session["QueryEForms"] != null)
                {
                    //QueryEForms
                    QuerySession.QueryEForm QEForm = Session["QueryEForms"] as QuerySession.QueryEForm;
                    if (QEForm == null)
                    {
                        return;
                    }

                    if (QEForm.ProTypeId != 0)
                    {
                        try
                        {
                            ddlProType.Text = QEForm.ProTypeId.ToString();
                        }
                        catch (Exception)
                        {
                        }
                    }
                    if (QEForm.FromTime != "")
                    {
                        txtFrom.Text = QEForm.FromTime;
                    }

                    if (QEForm.ToTime != "")
                    {
                        txtTo.Text = QEForm.ToTime;
                    }
                    if (QEForm.State != "")
                    {
                        ddlState.Text = QEForm.State;
                    }

                    if (QEForm.Apper != "")
                    {
                        foreach (ListItem m in ddlUser.Items)
                        {
                            if (m.Text == QEForm.Apper)
                            {
                                m.Selected = true;
                                break;
                            }
                        }
                        //ddlUser.SelectedItem.Text = QEForm.Apper;
                    }

                    if (QEForm.Auper != "")
                    {
                        txtAuper.Text = QEForm.Auper;
                    }

                    if (QEForm.WatingAuper != "")
                    {
                        txtWating.Text = QEForm.WatingAuper;
                    }

                    if (QEForm.E_No != "")
                    {
                        txtNo.Text = QEForm.E_No;
                    }
                    if (QEForm.PONO != "")
                    {
                        txtPONo.Text = QEForm.PONO;
                    }
                    if (QEForm.GuestName != "")
                    {
                        txtGuestName.Text = QEForm.GuestName;
                    }


                    txtSPForm.Text = QEForm.SPForm;
                    txtSPTo.Text   = QEForm.SPTo;
                    select();
                }
                else
                {
                    tb_EFormService eformSer  = new tb_EFormService();
                    List <tb_EForm> allEForms = new List <tb_EForm>();// eformSer.GetListArray_1("");

                    this.gvList.DataSource = allEForms;
                    this.gvList.DataBind();
                }
            }
        }
コード例 #26
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();

                if (Session["currentUserId"] != null)
                {
                    List <VAN_OA.Model.User>  user    = new List <VAN_OA.Model.User>();
                    VAN_OA.Dal.SysUserService userSer = new VAN_OA.Dal.SysUserService();
                    if (VAN_OA.JXC.SysObj.IfShowAll("出库发票清单", Session["currentUserId"], "ShowAll") == false)
                    {
                        var model = Session["userInfo"] as User;
                        user.Insert(0, model);
                    }
                    else
                    {
                        user = userSer.getAllUserByPOList();
                        user.Insert(0, new VAN_OA.Model.User()
                        {
                            LoginName = "全部", Id = -1
                        });
                    }
                    ddlUser.DataSource = user;
                    ddlUser.DataBind();
                    ddlUser.DataTextField  = "LoginName";
                    ddlUser.DataValueField = "Id";


                    List <SellFPReport> list = new List <SellFPReport>();
                    gvMain.DataSource = list;
                    gvMain.DataBind();

                    var fpTypeBaseInfoService           = new FpTypeBaseInfoService();
                    List <FpTypeBaseInfo> gooQGooddList = fpTypeBaseInfoService.GetListArray("");
                    gooQGooddList.Insert(0, new FpTypeBaseInfo {
                        FpType = "全部", Id = 0
                    });
                    dllFPstye.DataSource = gooQGooddList;
                    dllFPstye.DataBind();
                    dllFPstye.DataTextField  = "FpType";
                    dllFPstye.DataValueField = "Id";
                    //                    string sql = string.Format(@"select COUNT(*) from role_sys_form left join sys_Object on sys_Object.FormID=role_sys_form.sys_form_Id and sys_Object.roleId=role_sys_form.role_Id and textName='可导出'
                    //where  role_Id in (select roleId from Role_User where userId={0}) and sys_form_Id in(select formID from sys_form where displayName='出库发票清单') and sys_Object.AutoID is not null", Session["currentUserId"]);
                    //                    if (Convert.ToInt32(DBHelp.ExeScalar(sql)) <= 0)
                    if (NewShowAll_textName("出库发票清单", "可导出"))
                    {
                        Button1.Visible = true;
                    }
                    else
                    {
                        Button1.Visible = false;
                    }
                    if (Request["PONo"] != null)
                    {
                        txtPONo.Text        = Request["PONo"].ToString();
                        cbIsSpecial.Checked = false;
                        Show();
                    }
                }
            }
        }
コード例 #27
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.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 user    = new List <Model.User>();
                var userSer = new Dal.SysUserService();
                if (QuanXian_ShowAll("预期报销单列表") == false)
                {
                    ViewState["showAll"] = false;
                    var model = Session["userInfo"] as User;
                    user.Insert(0, model);
                }
                else
                {
                    user = userSer.getAllUserByPOList();
                    user.Insert(0, new VAN_OA.Model.User()
                    {
                        LoginName = "全部", Id = -1
                    });
                }

                if (!NewShowAll_textName("预期报销单列表", "编辑"))
                {
                    gvList.Columns[0].Visible = false;
                }

                if (!NewShowAll_textName("预期报销单列表", "编辑发票号"))
                {
                    gvList.Columns[1].Visible = false; btnExcel.Visible = false;
                }
                else
                {
                    btnExcel.Visible = true;
                }
                ddlUser.DataSource = user;
                ddlUser.DataBind();
                ddlUser.DataTextField  = "LoginName";
                ddlUser.DataValueField = "Id";

                var dispatchList = new List <Tb_DispatchList>();
                gvList.DataSource = dispatchList;
                gvList.DataBind();

                GuestTypeBaseInfoService dal = new GuestTypeBaseInfoService();
                var dalList = dal.GetListArray("");
                dalList.Insert(0, new VAN_OA.Model.BaseInfo.GuestTypeBaseInfo {
                    GuestType = "全部"
                });
                ddlGuestTypeList.DataSource = dalList;
                ddlGuestTypeList.DataBind();
                ddlGuestTypeList.DataTextField  = "GuestType";
                ddlGuestTypeList.DataValueField = "GuestType";

                GuestProBaseInfoService guestProBaseInfodal = new GuestProBaseInfoService();
                var proList = guestProBaseInfodal.GetListArray("");
                proList.Insert(0, new VAN_OA.Model.BaseInfo.GuestProBaseInfo {
                    GuestPro = -2
                });
                ddlGuestProList.DataSource = proList;
                ddlGuestProList.DataBind();
                ddlGuestProList.DataTextField  = "GuestProString";
                ddlGuestProList.DataValueField = "GuestPro";
            }
        }
コード例 #28
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();

                List <InvoiceReport> invoiceList = new List <InvoiceReport>();

                this.gvList.DataSource = invoiceList;
                this.gvList.DataBind();

                txtPOFrom.Text = DateTime.Now.AddYears(-1).Year + "-1-1";

                //var user = new List<VAN_OA.Model.User>();
                //var userSer = new VAN_OA.Dal.SysUserService();
                //user = userSer.getAllUserByPOList();
                //user.Insert(0, new VAN_OA.Model.User() { LoginName = "全部", Id = -1 });
                //ddlUser.DataSource = user;
                //ddlUser.DataBind();
                //ddlUser.DataTextField = "LoginName";
                //ddlUser.DataValueField = "Id";
                List <VAN_OA.Model.User>  user    = new List <VAN_OA.Model.User>();
                VAN_OA.Dal.SysUserService userSer = new VAN_OA.Dal.SysUserService();
                if (VAN_OA.JXC.SysObj.NewShowAll_Name("发票比对", Session["currentUserId"], "ShowAll") == false)
                {
                    ViewState["showAll"] = false;
                    var model = Session["userInfo"] as User;
                    user.Insert(0, model);
                }
                else
                {
                    user = userSer.getAllUserByPOList();
                    user.Insert(0, new VAN_OA.Model.User()
                    {
                        LoginName = "全部", Id = -1
                    });
                }
                ddlUser.DataSource = user;
                ddlUser.DataBind();
                ddlUser.DataTextField  = "LoginName";
                ddlUser.DataValueField = "Id";

                if (Request["PONo"] != null)
                {
                    isSelect                      = true;
                    txtPONo.Text                  = Request["PONo"];
                    txtPOFrom.Text                = "";
                    cbIsSpecial.Checked           = false;
                    AspNetPager1.CurrentPageIndex = 1;
                    Show();
                }
            }
        }
コード例 #29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                List <WFAEPromiseTotal> _list = new List <WFAEPromiseTotal>();
                this.gvList.DataSource = _list;
                this.gvList.DataBind();

                TB_CompanyService comSer = new TB_CompanyService();
                var comList = comSer.GetListArray("");

                comList.Insert(0, new VAN_OA.Model.BaseInfo.TB_Company()
                {
                    ComCode = "-1", ComName = "全部"
                });

                for (int i = 2012; i <= DateTime.Now.Year; i++)
                {
                    ddlYear.Items.Add(new ListItem {
                        Value = i.ToString(), Text = i.ToString()
                    });
                }
                ddlYear.SelectedValue = (DateTime.Now.Year).ToString();

                if (NewShowAll_textName("销售指标", "编辑") == false)
                {
                    gvList.Columns[1].Visible = false;
                    btnAdd.Visible            = false;
                }
                if (NewShowAll_textName("销售指标", "删除") == false)
                {
                    gvList.Columns[2].Visible = false;
                }
                bool showAll = true;

                if (NewShowAll_textName("销售指标", "查看所有"))
                {
                    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 <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);
                    ddlCompany.Enabled = false;
                }

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

                ddlCompany.DataSource = comList;
                ddlCompany.DataBind();
            }
        }
コード例 #30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                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();

                //清除Session
                WebQuerySessin Sess = new WebQuerySessin("QueryRequestEForms");

                gvList.PagerSettings.Mode = PagerButtons.NumericFirstLast;

                A_ProInfoService proSer = new A_ProInfoService();
                List <A_ProInfo> pros   = this.proSer.GetListArray("");
                pros.Insert(0, new A_ProInfo());
                ddlProType.DataSource = pros;
                ddlProType.DataBind();

                ddlProType.DataTextField  = "pro_Type";
                ddlProType.DataValueField = "pro_Id";


                //加载SESSION中的数据
                if (Session["QueryRequestEForms"] != null)
                {
                    //QueryEForms
                    QuerySession.QueryEForm QEForm = Session["QueryRequestEForms"] as QuerySession.QueryEForm;
                    if (QEForm == null)
                    {
                        return;
                    }

                    if (QEForm.ProTypeId != 0)
                    {
                        try
                        {
                            ddlProType.Text = QEForm.ProTypeId.ToString();
                        }
                        catch (Exception)
                        {
                        }
                    }
                    if (QEForm.FromTime != "")
                    {
                        txtFrom.Text = QEForm.FromTime;
                    }

                    if (QEForm.ToTime != "")
                    {
                        txtTo.Text = QEForm.ToTime;
                    }
                    if (QEForm.State != "")
                    {
                        ddlState.Text = QEForm.State;
                    }

                    if (QEForm.E_No != "")
                    {
                        txtNo.Text = QEForm.E_No;
                    }
                }
                if (Request["Type"] != null)
                {
                    string type = Request["Type"].ToString();
                    if (type == "Doing")
                    {
                        ddlState.Text = "执行中";
                    }

                    if (type == "Success")
                    {
                        ddlState.Text = "通过";
                    }

                    if (type == "SuccessCai")
                    {
                        ddlState.Text = "通过";
                    }


                    if (type == "Fail")
                    {
                        ddlState.Text = "不通过";
                    }
                    select();
                }
                else
                {
                    select();
                    // //加载SESSION中的数据
                    //if (Session["QueryRequestEForms"] == null)
                    //{
                    //    tb_EFormService eformSer = new tb_EFormService();
                    //    string sql = string.Format("  appPer={0}", Session["currentUserId"].ToString());
                    //    List<tb_EForm> allEForms = eformSer.GetListArray_1(sql);
                    //    AspNetPager1.RecordCount = allEForms.Count;
                    //    this.gvList.PageIndex = AspNetPager1.CurrentPageIndex - 1;
                    //    this.gvList.DataSource = allEForms;
                    //    this.gvList.DataBind();

                    //}
                    //else
                    //{
                    //    select();
                    //}
                }
            }
            if (Session["printUrl"] != null)
            {
                string url = Session["printUrl"].ToString();
                Session["printUrl"] = null;
                Response.Write(string.Format("<script>window.open('{0}','_blank')</script>", url));
            }
        }