private void BindData(U_ZCFilesBU file1) { bool flag = false; if (file1 == null) { file1 = new U_ZCFilesBU(); flag = true; } DataSet ds1 = file1.GetAttachListByBID(Request["id"].ToString()); this.Repeater1.DataSource = ds1; this.Repeater1.DataBind(); string id = Request["id"]; U_ZCBAOBU zc1 = new U_ZCBAOBU(); DataSet ds = zc1.GetDetailByID(id, "depart,bzeren,bname"); zc1.Close(); if (ds.Tables[0].Rows.Count > 0) { this.Bname.Text = ds.Tables[0].Rows[0]["bname"].ToString(); this.depart.Text = ds.Tables[0].Rows[0]["depart"].ToString(); this.zeren.Text = ds.Tables[0].Rows[0]["bzeren"].ToString(); } if (flag) { file1.Close(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Comm.SetDepart(this.depart, "所有部门"); ///////////////////////////////////// ; this.depart.SelectedValue = ""; /////////////////////////////////////// U_ItemBU item1 = new U_ItemBU();; item1.ItemName = "行政区域"; item1.SetLiteralControl(this.quyu, "全部..."); item1.ItemName = "行业分类"; item1.SetLiteralControl(this.hangye, "全部..."); item1.SetStatus(this.jzdc, "尽职调查"); item1.SetStatus(this.fasp, "方案审批"); item1.SetStatus(this.fazx, "方案执行"); item1.Close(); U_ZCBAOBU zcb1 = new U_ZCBAOBU(); zcb1.SetBstatus(this.Bstatus, "全部..."); zcb1.Close(); //////////////////////////////////////////// depart_SelectedIndexChanged(this.depart, e); } }
//资产包详细信息 private void BindZcInfo() { U_ZCBAOBU zcb1 = new U_ZCBAOBU(); string ids = zcb1.GetZCIDByBID(Request["ID"].ToString()); U_ZCBU zc1 = new U_ZCBU(); DataSet ds1 = zc1.GetZCInfoByID(ids); this.Repeater1.DataSource = ds1; this.Repeater1.DataBind(); zcb1.Close(); //统计总和 for (int i = 0; i < ds1.Tables[0].Rows.Count; i++) { DataRow dr = ds1.Tables[0].Rows[i]; if (dr["bj"] != DBNull.Value) { this.sum1 = this.sum1 + double.Parse(dr["bj"].ToString()); } if (dr["lxhj"] != DBNull.Value) { this.sum2 = this.sum2 + double.Parse(dr["lxhj"].ToString()); } } }
private void BindData(string Bname) { U_ZCBAOBU zcb1 = new U_ZCBAOBU(); DataSet ds1 = zcb1.GetZCBAOInfo(Bname); this.GridView1.DataSource = ds1; this.GridView1.DataBind(); zcb1.Close(); ds1.Dispose(); }
protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName == "delete") { U_ZCBAOBU zcb1 = new U_ZCBAOBU(); zcb1.DelZCFromZcBao(e.CommandArgument.ToString()); zcb1.Close(); this.Bind(); } }
private void BindData(string Bname) { U_ZCBAOBU zcb1 = new U_ZCBAOBU(); DataSet ds1 = zcb1.GetZcBaoSearchResult2(Bname, this.GetMyDepartMen()); this.GridView1.DataSource = ds1; this.GridView1.DataBind(); zcb1.Close(); ds1.Dispose(); }
//绑定数据 private void BindData(string bname) { U_ZCBAOBU zc1 = new U_ZCBAOBU(); DataSet ds1 = zc1.GetMyShenPiZcB(User.Identity.Name, bname, 1); this.GridView1.DataSource = ds1; this.GridView1.DataBind(); zc1.Close(); ds1.Dispose(); }
private void BindData(string Bname) { U_ZCBAOBU zcb1 = new U_ZCBAOBU(); DataSet ds1 = zcb1.GetZcBaoSearchResult2(Bname, User.Identity.Name); this.GridView1.DataSource = ds1; this.GridView1.DataBind(); zcb1.Close(); ds1.Dispose(); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { PubComm.SetDepart(this.depart, "所有部门"); PubComm.SetZCStatus(this.status, "所有状态"); ///////////////////////////////////// this.depart.SelectedValue = ""; this.zcbao.SelectedValue = ""; /////////////////////////////////////// U_ItemBU item1 = new U_ItemBU(); item1.ItemName = "政策包"; item1.SetLiteralControl(this.zcbao, "全部..."); this.zcbao.SelectedValue = ""; item1.ItemName = "行政区域"; item1.SetLiteralControl(this.quyu, "全部..."); item1.ItemName = "行业分类"; item1.SetLiteralControl(this.hangye, "全部..."); item1.ItemName = "资产性质分类"; item1.SetLiteralControl(this.fenlei, "全部..."); item1.Close(); U_ZCBAOBU zcb1 = new U_ZCBAOBU(); zcb1.SetBstatus(this.Bstatus, "全部..."); zcb1.Close(); //////////////////////////////////////////// depart_SelectedIndexChanged(this.depart, e); U_ItemBU item = new U_ItemBU(); item.Setuserkind(this.userkind); item.Close(); //调整执行状态的选择 (====2013年新增=====) PubComm.SetProfile("方案执行结果", this.spresult, ""); PubComm.SetProfile("方案执行状态大类", this.status1, "全部..."); //this.status1.Items.Add(new ListItem("全部...", "")); this.status2.Items.Add(new ListItem("全部...", "")); } this.danwei.Attributes.Add("onkeydown", "javascript:if( event.keyCode == 13 ) { " + this.Button1.ClientID + ".click(); return false; } "); this.num1.Attributes.Add("onkeydown", "javascript:if( event.keyCode == 13 ) { " + this.Button1.ClientID + ".click(); return false; } "); this.num2.Attributes.Add("onkeydown", "javascript:if( event.keyCode == 13 ) { " + this.Button1.ClientID + ".click(); return false; } "); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { U_ZCBAOBU zcb1 = new U_ZCBAOBU(); zcb1.SetBstatus(this.Bstatus, ""); zcb1.Close(); if (this.Bstatus.Items.Count > 0) { this.Bstatus.SelectedIndex = 0; } } }
private void BindDate() { List <SearchField> list1 = new List <SearchField>(); list1.Add(new SearchField("id", ViewState["bid"].ToString(), SearchOperator.集合, SearchFieldType.数值型)); U_ZCBAOBU zcb1 = new U_ZCBAOBU(); DataSet ds = zcb1.GetDetail(list1, "*"); zcb1.Close(); this.GridView1.DataSource = ds; this.GridView1.DataBind(); ds.Dispose(); }
//判断某用户对某资产包是否有维护的权限 public static bool IsZcBaoMng(string bid, string username) { bool result = false; U_ZCBAOBU zcb1 = new U_ZCBAOBU(); DataSet ds1 = zcb1.GetDetailByID(bid, "bzeren"); if (ds1.Tables[0].Rows.Count > 0) { if (ds1.Tables[0].Rows[0][0].ToString() == username) { result = true; } } zcb1.Close(); return(result); }
private void BindData() { U_ZCBAOBU zcb1 = new U_ZCBAOBU(); string ids = zcb1.GetZCIDByBID(Request["id"].ToString()); zcb1.Close(); List <SearchField> list1 = new List <SearchField>(); list1.Add(new SearchField("id", ids, SearchOperator.集合, SearchFieldType.数值型)); list1.Add(new SearchField("zeren", User.Identity.Name, SearchFieldType.字符型)); U_ZCBU zc1 = new U_ZCBU(); DataSet ds = zc1.GetSearchResult(list1); this.GridView1.DataSource = ds; this.GridView1.DataBind(); ds.Dispose(); zc1.Close(); }
private void BindData() { if (Request["id"] != null) { string id = Request["id"]; U_ZCBAOBU zcb1 = new U_ZCBAOBU(); DataSet ds = zcb1.GetDetailByID(id, "id,depart,bzeren,bstatus,statusText,bname,bljsk,bljzc"); this.Bname.Text = ds.Tables[0].Rows[0]["bname"].ToString(); this.Bid.Text = ds.Tables[0].Rows[0]["id"].ToString(); this.depart.Text = ds.Tables[0].Rows[0]["depart"].ToString(); this.bzeren.Text = ds.Tables[0].Rows[0]["bzeren"].ToString(); this.status.Text = ds.Tables[0].Rows[0]["bstatus"].ToString(); this.statusText.Text = ds.Tables[0].Rows[0]["statusText"].ToString(); this.ljsk.Text = ds.Tables[0].Rows[0]["bljsk"].ToString(); this.ljzc.Text = ds.Tables[0].Rows[0]["bljzc"].ToString(); if (this.statusText.Text == "") { this.statusText.Text = "阅卷"; } ds.Dispose(); Hashtable ht = zcb1.GetZcBbjANDlx(this.Bid.Text); this.bbjhj.Text = ht["bbjhj"].ToString(); this.blxhj.Text = ht["blxhj"].ToString(); zcb1.Close(); //设置数字金额的显示 string[] num1 = new string[] { "bbjhj", "blxhj", "ljzc", "ljsk" }; for (int i = 0; i < num1.Length; i++) { Label l1 = this.bbjhj.Parent.FindControl(num1[i]) as Label; if (l1 != null) { l1.Text = Comm.GetNumberFormat(l1.Text); } } ds.Dispose(); } }
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)"; } }
private void Bind() { if (Request["ID"] != null) { U_ZCBAOBU zcb1 = new U_ZCBAOBU(); DataSet ds = zcb1.GetZCBAOInfoByID(Request["ID"].ToString()); this.Bname.Text = ds.Tables[0].Rows[0]["Bname"].ToString(); this.Bjsf.Text = ds.Tables[0].Rows[0]["Bjsf"].ToString(); this.Bzeren.Text = ds.Tables[0].Rows[0]["Bzeren"].ToString(); this.Bzeren1.Text = ds.Tables[0].Rows[0]["bzeren1"].ToString(); this.Bremark.Text = ds.Tables[0].Rows[0]["Bremark"].ToString(); ViewState["Bname"] = ds.Tables[0].Rows[0]["Bname"].ToString(); string ids = zcb1.GetZCIDByBID(Request["ID"].ToString()); U_ZCBU zc1 = new U_ZCBU(); DataSet ds1 = zc1.GetZCInfoByID(ids); this.Repeater1.DataSource = ds1; this.Repeater1.DataBind(); zcb1.Close(); } }
//绑定资产调查数据 private void BindData() { if (Request["id"] != null) { string id = Request["id"]; U_ZCBAOBU zcb1 = new U_ZCBAOBU(); DataSet ds = zcb1.GetDetailByID(id, "id,depart,bzeren,bstatus,statusText,bname"); zcb1.Close(); this.Bname.Text = ds.Tables[0].Rows[0]["bname"].ToString(); this.Bid.Text = ds.Tables[0].Rows[0]["id"].ToString(); this.depart.Text = ds.Tables[0].Rows[0]["depart"].ToString(); this.bzeren.Text = ds.Tables[0].Rows[0]["bzeren"].ToString(); this.status.Text = ds.Tables[0].Rows[0]["bstatus"].ToString(); this.statusText.Text = ds.Tables[0].Rows[0]["statusText"].ToString(); if (this.statusText.Text == "") { this.statusText.Text = "阅卷"; } ds.Dispose(); this.SetButton(); } }
private void SetPageData() { if (Request["id"] != null) { string id = Request["id"]; U_ZCBAOBU zcb1 = new U_ZCBAOBU(); DataSet ds = zcb1.GetZCBAOInfoByID(id); zcb1.Close(); //设置控件的值 bool owner = false; string user1 = ""; if (ds.Tables[0].Rows[0]["bzeren"] != DBNull.Value) { user1 = ds.Tables[0].Rows[0]["bzeren"].ToString(); } if (user1 == User.Identity.Name || (user1.Trim() == "" && Comm.IsRole("系统管理员"))) { owner = true; } else { this.Button1.Visible = false; } //设置控件数据的显示 for (int i = 1; i < ds.Tables[0].Columns.Count; i++) { string colName = ds.Tables[0].Columns[i].ColumnName.ToLower(); if (owner) { if (this.Bname.Parent.FindControl(colName) != null) { Util.SetControlValue(this.Bname.Parent.FindControl(colName), ds.Tables[0].Rows[0][colName]); } if (this.Bname.Parent.FindControl(colName + "_1") != null) { this.Bname.Parent.FindControl(colName + "_1").Visible = false;; } } else { if (this.Bname.Parent.FindControl(colName + "_1") != null) { Util.SetControlValue(this.Bname.Parent.FindControl(colName + "_1"), ds.Tables[0].Rows[0][colName]); } if (this.Bname.Parent.FindControl(colName) != null) { this.Bname.Parent.FindControl(colName).Visible = false;; } } } //设置数字金额的显示 string[] num1 = new string[] { "Bljsk", "Bljzc" }; for (int i = 0; i < num1.Length; i++) { TextBox t1 = this.Bljsk.Parent.FindControl(num1[i]) as TextBox; Label l1 = this.Bljsk.Parent.FindControl(num1[i] + "_1") as Label; if (t1 != null) { t1.Text = Comm.GetNumberFormat(t1.Text); } if (l1 != null) { l1.Text = Comm.GetNumberFormat(l1.Text); } } } }