private void BindList() { string id = Request.QueryString["id"]; U_ZCBU zc1 = new U_ZCBU(); DataSet ds = zc1.GetDetailByID(id, "danwei,depart,zeren"); this.danwei.Text = ds.Tables[0].Rows[0]["danwei"].ToString(); this.depart.Text = ds.Tables[0].Rows[0]["depart"].ToString(); this.zeren.Text = ds.Tables[0].Rows[0]["zeren"].ToString(); zc1.Close(); CW_StockBillBU stock1 = new CW_StockBillBU(); this.Repeater1.DataSource = stock1.GetStockListByZcID1(id); this.Repeater1.DataBind(); stock1.Close(); //////////////////////////////////////// CW_ShouKuanBU shoukuan1 = new CW_ShouKuanBU(); List <SearchField> list1 = new List <SearchField>(); list1.Add(new SearchField("zcid", Request.QueryString["id"], SearchFieldType.数值型)); this.Repeater2.DataSource = shoukuan1.GetBillList("2", list1, true); this.Repeater2.DataBind(); //////////////////////////////////////////////////////////// list1.Clear(); list1.Add(new SearchField("zcid", Request.QueryString["id"], SearchFieldType.数值型)); this.Repeater3.DataSource = shoukuan1.GetBillList("3", list1, true); this.Repeater3.DataBind(); shoukuan1.Close(); }
private void BindList() { CW_ShouKuanBU shoukuan1 = new CW_ShouKuanBU(); List <SearchField> list1 = new List <SearchField>(); list1.Add(new SearchField("zcid", Request.QueryString["zcid"], SearchFieldType.数值型)); DataSet ds1 = shoukuan1.GetBillList("0", list1, true); this.Repeater1.DataSource = ds1; this.Repeater1.DataBind(); if (ds1.Tables[0].Rows.Count <= 0) { this.Repeater1.Visible = false; } ds1.Dispose(); //////////////////////////////////////////////////////////// list1.Clear(); list1.Add(new SearchField("zcid", Request.QueryString["zcid"], SearchFieldType.数值型)); DataSet ds2 = shoukuan1.GetBillList("1", list1, true); this.Repeater2.DataSource = ds2; this.Repeater2.DataBind(); if (ds2.Tables[0].Rows.Count <= 0) { this.Repeater2.Visible = false; } ds2.Dispose(); shoukuan1.Close(); }
private void BindData() { List <SearchField> list1 = (List <SearchField>)ViewState["SearchCondition"]; string kind = ViewState["SearchKind"].ToString(); CW_ShouKuanBU shoukuan1 = new CW_ShouKuanBU(); DataSet ds = shoukuan1.GetBillList(kind, list1, true); shoukuan1.Close(); if (kind == "0" || kind == "1") { if (ds.Tables[0].Rows.Count > 0) { DataRow dr = ds.Tables[0].NewRow(); dr["danwei1"] = "合计"; dr["bxhj"] = "0"; for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { dr["bxhj"] = double.Parse(dr["bxhj"].ToString()) + double.Parse(ds.Tables[0].Rows[i]["bxhj"].ToString()); } ds.Tables[0].Rows.Add(dr); } } this.GridView1.DataSource = ds; this.GridView1.DataBind(); }
//按年统计 protected void butSt4_Click(object sender, EventArgs e) { int y1 = int.Parse(this.byear3.SelectedValue); CW_ShouKuanBU shou1 = new CW_ShouKuanBU(); DataSet ds = shou1.GetHuiKuanStaticDataByYear(y1); shou1.Close(); this.SetTableData(y1 + "年度长江资产回款汇总表", ds); }
//按年和季度统计数据 protected void butSt3_Click(object sender, EventArgs e) { int y1 = int.Parse(this.byear2.SelectedValue); int jd1 = int.Parse(this.jidu.SelectedValue); CW_ShouKuanBU shou1 = new CW_ShouKuanBU(); DataSet ds = shou1.GetHuiKuanStaticDataByYearAndQuarty(y1, jd1); shou1.Close(); this.SetTableData(y1 + "年" + jd1 + "季度长江资产回款汇总表", ds); }
//按月统计回款数据 protected void butSt2_Click(object sender, EventArgs e) { int y1 = int.Parse(this.byear1.SelectedValue); int m1 = int.Parse(this.bmonth1.SelectedValue); CW_ShouKuanBU shou1 = new CW_ShouKuanBU(); DataSet ds = shou1.GetHuiKuanStaticDataByYearAndMonth(y1, m1); shou1.Close(); this.SetTableData(y1 + "年" + m1 + "月长江资产回款汇总表", ds); }
private void BindData() { List <SearchField> list1 = new List <SearchField>(); string kind = "1"; CW_ShouKuanBU shoukuan1 = new CW_ShouKuanBU(); DataSet ds = shoukuan1.GetBillList(kind, list1, false); shoukuan1.Close(); this.GridView1.DataSource = ds; this.GridView1.DataBind(); }
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { string id = this.GridView1.DataKeys[e.RowIndex].Value.ToString(); if (id != "") { CW_ShouKuanBU sk1 = new CW_ShouKuanBU(); sk1.DelShoukuanDJ(id); sk1.Close(); this.BindData(); } }
private void BindData(string begintime, string endtime) { CW_ShouKuanBU sk1 = new CW_ShouKuanBU(); DataSet ds = sk1.GetHuiKuanByDepart(begintime, endtime); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { ds.Tables[0].Rows[i]["hkje"] = PubComm.GetNumberFormat(ds.Tables[0].Rows[i]["hkje"].ToString()); AllHK = AllHK + double.Parse(ds.Tables[0].Rows[i]["hkje"].ToString()); } this.Repeater1.DataSource = ds; this.Repeater1.DataBind(); sk1.Close(); }
//审核单据 protected void SaveDataClick(object sender, EventArgs e) { CW_ShouKuanBU shoukuan1 = new CW_ShouKuanBU(); bool check1 = shoukuan1.CheckBill(Request.QueryString["id"], User.Identity.Name); shoukuan1.Close(); if (check1) { Comm.ShowInfo("提示:审核单据成功!", Application["root"] + "/Caiwu/CheckShouKuanList.aspx"); } else { Comm.ShowInfo("提示:审核单据失败,请重新审核!", Request.RawUrl); } }
private void BindList() { CW_ShouKuanBU shoukuan1 = new CW_ShouKuanBU(); List <SearchField> list1 = new List <SearchField>(); list1.Add(new SearchField("zcid", Request.QueryString["id"], SearchFieldType.数值型)); this.Repeater1.DataSource = shoukuan1.GetBillList("0", list1, true); this.Repeater1.DataBind(); //////////////////////////////////////////////////////////// list1.Clear(); list1.Add(new SearchField("zcid", Request.QueryString["id"], SearchFieldType.数值型)); this.Repeater2.DataSource = shoukuan1.GetBillList("1", list1, true); this.Repeater2.DataBind(); shoukuan1.Close(); }
//按用户自定义的时间段统计 protected void butSt1_Click(object sender, EventArgs e) { string begtime = this.time1.Text; string endtime = this.time2.Text; CW_ShouKuanBU shou1 = new CW_ShouKuanBU(); DataSet ds = shou1.GetHuiKuanStaticDataByDefineTime(begtime, endtime); shou1.Close(); if (begtime == "") { begtime = "过去"; } if (endtime == "") { endtime = "现在"; } this.SetTableData(begtime + "~" + endtime + "长江资产回款汇总表", ds); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { this.billtime.Text = DateTime.Now.ToString("yyyy-M-d"); this.billmen.Text = User.Identity.Name; U_ZCBU zc1 = new U_ZCBU(); DataSet ds = zc1.GetDetailByID(Request.QueryString["zcid"], "danwei,zeren"); zc1.Close(); if (ds.Tables[0].Rows.Count > 0) { Util.SetControlValue(danwei, ds.Tables[0].Rows[0]["danwei"]); Util.SetControlValue(zeren, ds.Tables[0].Rows[0]["zeren"]); CW_ShouKuanBU sk1 = new CW_ShouKuanBU(); this.bill.Text = sk1.GetBillNum(); sk1.Close(); } this.billtime.Attributes["onfocus"] = "setday(this)"; } }
//绑定人员 protected void Repeater1_DataBound(object sender, RepeaterItemEventArgs e) { CW_ShouKuanBU sk1 = new CW_ShouKuanBU(); DataSet ds10 = sk1.GetGSHK(this.BeginTime.Text, this.EndTime.Text); ds10.Tables[0].Rows[0]["hkje"] = PubComm.GetNumberFormat(AllHK); GridView gridview10 = e.Item.FindControl("GridView10") as GridView; if (gridview10 != null) { gridview10.ShowHeader = false; gridview10.DataSource = ds10; gridview10.DataBind(); } //gridview10.Dispose(); Label lab1 = e.Item.FindControl("labDepart") as Label; if (lab1 != null) { DataSet ds1 = sk1.Gethuikuan(this.BeginTime.Text, this.EndTime.Text, lab1.Text); for (int i = 0; i < ds1.Tables[0].Rows.Count; i++) { ds1.Tables[0].Rows[i]["hkje"] = PubComm.GetNumberFormat(ds1.Tables[0].Rows[i]["hkje"].ToString()); } GridView gridview1 = e.Item.FindControl("GridView1") as GridView; if (gridview1 != null) { gridview1.DataSource = ds1; gridview1.DataBind(); } gridview1.Dispose(); } sk1.Close(); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { CW_ShouKuanBU shoukuan1 = new CW_ShouKuanBU(); Hashtable ht = shoukuan1.GetObjectByID(Request.QueryString["id"]); for (int i = 0; i < arr1.Length; i++) { Util.SetControlValue(this.bill.Parent.FindControl(arr1[i]), ht[arr1[i]]); } if (this.billtime.Text != "" && this.billtime.Text != null) { this.billtime.Text = DateTime.Parse(this.billtime.Text).ToString("yyyy-M-d"); } this.pbj.Text = Comm.GetNumberFormat(this.pbj.Text); this.plx.Text = Comm.GetNumberFormat(this.plx.Text); shoukuan1.Close(); if (ht["checktime"] != DBNull.Value) { this.Button1.Visible = false; this.Button2.Attributes["onclick"] = "history.go(-1);return false;"; } else { this.Button2.Attributes["onclick"] = "top.location.href='CheckShouKuanList.aspx';return false;"; } //会计和出纳和修改单据的信息 U_RolesBU role1 = new U_RolesBU(); bool caiwu = role1.isRole(new string[] { "会计", "出纳" }); role1.Close(); if (caiwu == false) { this.Button3.Visible = false; } } }
protected void SaveDataClick(object sender, EventArgs e) { Hashtable ht = new Hashtable(); string[] arr1 = new string[] { "bill", "billtime", "danwei", "zeren", "pbj", "plx", "remark", "billmen" }; for (int i = 0; i < arr1.Length; i++) { ht.Add(arr1[i], Util.GetControlValue(this.billmen.Parent.FindControl(arr1[i]))); } ht.Add("zcid", Request.QueryString["zcid"]); try { CW_ShouKuanBU sk1 = new CW_ShouKuanBU(); sk1.InsertData(ht); sk1.Close(); PubComm.ShowInfo("【增加收款单据】操作成功!", Application["root"] + "/Caiwu/ZcSearch.aspx"); } catch { PubComm.ShowInfo("【增加收款单据】操作失败,可能的原因是单据编号重复,请重新输入!", Request.RawUrl); } }