/// <summary> /// 绑定数据 /// </summary> public void BindData() { bool havedata = false; if (this.CzID != null && this.CzID != String.Empty) { U_ZCSPBU sp1 = new U_ZCSPBU(); for (int i = 11; i <= 17; i++) { Repeater repeater1 = this.Repeater11.Parent.FindControl("Repeater" + i) as Repeater; if (repeater1 != null) { DataSet ds1 = sp1.GetZcSPList(this.CzID, i + ""); if (havedata == false && ds1.Tables[0].Rows.Count > 0) { havedata = true; } if (i == 12) { foreach (DataRow dr in ds1.Tables[0].Rows) { if (dr["time1"].ToString().Trim() == String.Empty) { dr["ps"] = "未编号"; } else { dr["ps"] = this.Xmsbh; } } } repeater1.DataSource = ds1; repeater1.DataBind(); if (ds1.Tables[0].Rows.Count == 0) { repeater1.Visible = false; } } } sp1.Close(); if (havedata) { this.NoRowData.Visible = false; } } }
//绑定资产审批的基本数据 private void BindData1(U_ZCBU zc1, string czid) { //设置基本数据 string[] arr1 = new string[] { "xmsbh", "danwei", "xmbj", "zclx", "zcse", "zqze", "bj", "lx", "fsxzly", "djyj", "cbdepart", "cbzeren", "num2" }; DataSet ds2 = zc1.GetShenBaoInfo(czid); if (ds2.Tables[0].Rows.Count > 0) { string zcid = ds2.Tables[0].Rows[0]["zcid"].ToString(); for (int i = 0; i < arr1.Length; i++) { HiddenField hid1 = this.xmbj.Parent.FindControl(arr1[i]) as HiddenField; if (hid1 != null) { hid1.Value = ds2.Tables[0].Rows[0][arr1[i]].ToString(); } } } //调整资产数额的显示 if (this.zcse.Value.Trim() != String.Empty) { if (Comm.isNumeric(this.zcse.Value)) { double t1 = double.Parse(this.zcse.Value) / 10000; this.zcse.Value = String.Format("{0:N2}", t1) + " 万元"; } } //调整债权显示的总额 double bj = double.Parse(ds2.Tables[0].Rows[0]["bj"].ToString()) / 10000; double lx = double.Parse(ds2.Tables[0].Rows[0]["lx"].ToString()) / 10000; double zqze = double.Parse(ds2.Tables[0].Rows[0]["zqze"].ToString()) / 10000; String format1 = "{0:N2}万元。其中:本金 {1:N2} 万元;利息 {2:N2} 万元"; this.zqze.Value = String.Format(format1, zqze, bj, lx); ds2.Dispose(); //得到部门处理意见 U_ZCSPBU zcsp1 = new U_ZCSPBU(); DataSet ds3 = zcsp1.GetZcSPRemark(Request["czczid"].ToString(), SP.部门审批); if (ds3.Tables[0].Rows.Count > 0) { this.bmremark.Value = String.Format("{0}\n\t\t\t\t{1}", ds3.Tables[0].Rows[0]["ps"], ds3.Tables[0].Rows[0]["zeren"]); //this.zeren1.Value = ds3.Tables[0].Rows[0]["zeren"].ToString(); this.zeren1.Value = User.Identity.Name; //当前用户 if (ds3.Tables[0].Rows[0]["time1"] != DBNull.Value) { DateTime dt1 = (DateTime)ds3.Tables[0].Rows[0]["time1"]; this.time1.Value = dt1.ToString("yyyy 年 MM 月 dd 日"); } DateTime dt2 = (DateTime)ds3.Tables[0].Rows[0]["time0"]; this.time2.Value = dt2.ToString("yyyy 年 MM 月 dd 日"); } ds3.Dispose(); //得到不同意见审批人 String[] spyj = new string[] { "13", "15" }; foreach (String m in spyj) { DataSet ds11 = zcsp1.GetZcSPList(Request["czczid"].ToString(), m); foreach (DataRow dr in ds11.Tables[0].Rows) { if (m == "13") { if (dr["ps"].ToString().Trim() == "同意") { if (this.yj1.Value == "") { this.yj1.Value = dr["zeren"].ToString(); } else { this.yj1.Value = this.yj1.Value + ";" + dr["zeren"].ToString(); } } if (dr["ps"].ToString().Trim() == "不同意") { if (this.yj2.Value == "") { this.yj2.Value = dr["zeren"].ToString(); } else { this.yj2.Value = this.yj2.Value + ";" + dr["zeren"].ToString(); } } } else { if (dr["ps"].ToString().Trim() == "同意") { if (this.yj3.Value == "") { this.yj3.Value = dr["zeren"].ToString(); } else { this.yj3.Value = this.yj3.Value + ";" + dr["zeren"].ToString(); } } if (dr["ps"].ToString().Trim() == "不同意") { if (this.yj4.Value == "") { this.yj4.Value = dr["zeren"].ToString(); } else { this.yj4.Value = this.yj4.Value + ";" + dr["zeren"].ToString(); } } } } } zcsp1.Close(); }