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(); } } }
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(); } } }
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(); } } }
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)); } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { WebQuerySessin Sess = new WebQuerySessin(Query); A_ProInfoService proSer = new A_ProInfoService(); List <A_ProInfo> pros = this.proSer.GetListArray(""); List <A_ProInfo> pros_1 = new List <A_ProInfo>(); for (int i = 0; i < pros.Count; i++) { if (pros[i].pro_Type == "外出送货单") { pros_1.Add(pros[i]); } } pros_1.Insert(0, new A_ProInfo()); ddlProType.DataSource = pros_1; 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.Auper != "") { txtWating.Text = QEForm.WatingAuper; } if (QEForm.WeiTuo != "") { //送货人 txtSouhuo.Text = QEForm.WeiTuo; } if (QEForm.E_No != "") { txtProNo.Text = QEForm.E_No; } select(); } else { txtFrom.Text = DateTime.Now.ToShortDateString(); txtTo.Text = DateTime.Now.ToShortDateString(); tb_EFormService eformSer = new tb_EFormService(); List <tb_EForm> allEForms = eformSer.GetListArray_Eform_DeliverGoods_Dispatch(string.Format(" 1=1 and appTime between '{0} 00:00:00' and '{0} 23:59:59'", DateTime.Now.ToShortDateString())); this.gvList.DataSource = allEForms; this.gvList.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { 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"; 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(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"; //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"; //加载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.State != "") { ddlState.Text = QEForm.State; } if (QEForm.E_No != "") { txtNo.Text = QEForm.E_No; } select(); } else { select(); //tb_EFormService eformSer = new tb_EFormService(); //List<tb_EForm> allEForms = eformSer.GetListArray_MyApps("", Convert.ToInt32(Session["currentUserId"])); //AspNetPager1.RecordCount = allEForms.Count; //this.gvList.PageIndex = AspNetPager1.CurrentPageIndex - 1; //this.gvList.DataSource = allEForms; //this.gvList.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { 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.State != "") { ddlState.Text = QEForm.State; } if (QEForm.Auper != "") { txtApper.Text = QEForm.Auper; } if (QEForm.E_No != "") { txtProNo.Text = QEForm.E_No; } if (QEForm.WeiTuo != "") { txtToPer.Text = QEForm.WeiTuo; } select(); } else { tb_EFormService eformSer = new tb_EFormService(); List <tb_EForm> allEForms = eformSer.GetListArray_MyApps_Consignor("", Convert.ToInt32(Session["currentUserId"])); AspNetPager1.RecordCount = allEForms.Count; this.gvList.PageIndex = AspNetPager1.CurrentPageIndex - 1; this.gvList.DataSource = allEForms; this.gvList.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { 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.State != "") { ddlState.Text = QEForm.State; } if (QEForm.E_No != "") { txtProNo.Text = QEForm.E_No; } select(); } else { tb_EFormService eformSer = new tb_EFormService(); string sql = string.Format(" appPer={0} and state='执行中'", Session["currentUserId"].ToString()); List <tb_EForm> allEForms = eformSer.GetListArray_Consignor(sql, Convert.ToInt32(Session["currentUserId"])); this.gvList.DataSource = allEForms; this.gvList.DataBind(); } } }