private void AuditStoreBind() { int year = Convert.ToInt32(cmbyear.SelectedItem.Value); int month = Convert.ToInt32(cmbmonth.SelectedItem.Value); int depid = common.IntSafeConvert(cmbdept.SelectedItem.Value); DataTable dt = BG_SelMonPayPlanLogic.GetMonPayPlan(depid, year, month, common.IntSafeConvert(cmbpici.SelectedItem.Text)); DataView dvView = dt.DefaultView; dvView.RowFilter = "MPFunding >0"; dt = dvView.ToTable(true); if (month != 0) { Monthcol.Hide(); } else { Monthcol.Show(); } AuditStore.DataSource = Getewdt(dt); AuditStore.DataBind(); if (dt.Rows.Count <= 0) { X.Msg.Alert("提示", "没有查询到数据").Show(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DepDataBind(); MonthDataBind(); //getpici(); cmbmonth.SelectedItem.Text = DateTime.Now.Month.ToString(); if (Request["depid"] != null && Request["pici"] != null && Request["time"] != null) { string time = ""; int depid = 0, pici = 0, Year = 0, Month = 0; if (Request["depid"] != null) { depid = common.IntSafeConvert(Request["depid"]); } if (Request["pici"] != null) { pici = common.IntSafeConvert(Request["pici"]); } if (Request["time"] != null) { time = Request["time"].ToString(); } DateTime mydate = new DateTime(); try { mydate = Convert.ToDateTime(time); } catch { mydate = DateTime.Now; } Year = mydate.Year; Month = mydate.Month; AuditStoreBind1(depid, Year, Month, pici); } DataTable dt = BG_SelMonPayPlanLogic.GetMonPayPlanTotalAudit(1); GTPdbsxStore.DataSource = dt; GTPdbsxStore.DataBind(); } cmbdept.Items.Insert(0, new Ext.Net.ListItem("全部", "0")); cmbpici.Items.Insert(0, new Ext.Net.ListItem("全部", "0")); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable dt = new DataTable( ); if (Request["Audit"] != null && Request["Audit"].ToString() == "0") { hidsta.Value = 0; dt = BG_SelMonPayPlanLogic.GetMonPayPlanTotalAudit(0); } else if (Request["Audit"] != null && Request["Audit"].ToString() == "1") { hidsta.Value = 1; dt = BG_SelMonPayPlanLogic.GetMonPayPlanTotalAudit(1); } GTPdbsxStore.DataSource = dt; GTPdbsxStore.DataBind(); } }