private void BindList() { CW_ShouKuan1BU shoukuan1 = new CW_ShouKuan1BU(); List <SearchField> list1 = new List <SearchField>(); list1.Add(new SearchField("bid", Request.QueryString["id"], SearchFieldType.数值型)); this.Repeater1.DataSource = shoukuan1.GetBillList("0", list1, true); this.Repeater1.DataBind(); //针对资产包内单户资产的收款情况 DataTable dt1 = this.GetShouKuanListForZc(Request.QueryString["id"]); this.Repeater11.DataSource = dt1; this.Repeater11.DataBind(); //////////////////////////////////////////////////////////// list1.Clear(); list1.Add(new SearchField("bid", Request.QueryString["id"], SearchFieldType.数值型)); this.Repeater2.DataSource = shoukuan1.GetBillList("1", list1, true); this.Repeater2.DataBind(); shoukuan1.Close(); //针对资产包内单户资产的支出情况 DataTable dt2 = this.GetZhiChuListForZc(Request.QueryString["id"]); this.Repeater21.DataSource = dt2; this.Repeater21.DataBind(); }
private void BindData() { List <SearchField> list1 = (List <SearchField>)ViewState["SearchCondition"]; string kind = ViewState["SearchKind"].ToString(); CW_ShouKuan1BU shoukuan1 = new CW_ShouKuan1BU(); 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["bname"] = "合计"; 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 Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { CW_ShouKuan1BU shoukuan1 = new CW_ShouKuan1BU(); 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 = PubComm.GetNumberFormat(this.pbj.Text); this.plx.Text = PubComm.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='CheckShouKuanList1.aspx';return false;"; } } }
private void BindData() { List <SearchField> list1 = new List <SearchField>(); string kind = "0"; CW_ShouKuan1BU shoukuan1 = new CW_ShouKuan1BU(); 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_ShouKuan1BU sk1 = new CW_ShouKuan1BU(); sk1.DelShoukuanDJ(id); sk1.Close(); this.BindData(); } }
protected void SaveDataClick(object sender, EventArgs e) { CW_ShouKuan1BU shoukuan1 = new CW_ShouKuan1BU(); bool check1 = shoukuan1.CheckBill(Request.QueryString["id"], User.Identity.Name); shoukuan1.Close(); if (check1) { PubComm.ShowInfo("提示:审核单据成功!", Application["root"] + "/Caiwu/CheckShouKuanList1.aspx"); } else { PubComm.ShowInfo("提示:审核单据失败,请重新审核!", Request.RawUrl); } }
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_ZCBAOBU zcb1 = new U_ZCBAOBU(); DataSet ds = zcb1.GetDetailByID(Request["bid"].ToString(), "Bname,Bzeren"); zcb1.Close(); if (ds.Tables[0].Rows.Count > 0) { Util.SetControlValue(bname, ds.Tables[0].Rows[0]["Bname"]); Util.SetControlValue(bzeren, ds.Tables[0].Rows[0]["Bzeren"]); CW_ShouKuan1BU sk1 = new CW_ShouKuan1BU(); this.bill.Text = sk1.GetBillNum(); sk1.Close(); } this.billtime.Attributes["onfocus"] = "setday(this)"; } }
protected void SaveDataClick(object sender, EventArgs e) { Hashtable ht = new Hashtable(); string[] arr1 = new string[] { "bill", "billtime", "bname", "bzeren", "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("bid", Request.QueryString["bid"]); try { CW_ShouKuan1BU sk1 = new CW_ShouKuan1BU(); sk1.InsertData(ht); sk1.Close(); Comm.ShowInfo("【增加收款单据】操作成功!", Application["root"] + "/Caiwu/ZcBaoSearch.aspx"); } catch { Comm.ShowInfo("【增加收款单据】操作失败,可能的原因是单据编号重复,请重新输入!", Request.RawUrl); } }