void AdvanceSearch1_OnMySearchClick(object sender, EventArgs e) { ZcMng1_AdvanceSearch search1 = sender as ZcMng1_AdvanceSearch; if (search1 != null) { List <SearchField> list1 = search1.SearchConditon; U_ZCBU zc1 = new U_ZCBU(); DataSet ds1 = zc1.GetDepartZcInfo(list1, User.Identity.Name, this.danwei.Text, this.zeren.Text); this.GridView1.DataSource = ds1; this.GridView1.DataBind(); zc1.Close(); ds1.Dispose(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { int pos1 = Request.Url.AbsoluteUri.LastIndexOf("/"); String url1 = Request.Url.AbsoluteUri.Substring(0, pos1); this.wordurl.Value = url1 + "/word1.doc"; this.wordurl1.Value = url1 + "/word2.doc"; //得到数据 U_ZCBU zc1 = new U_ZCBU(); this.BindData1(zc1, Request["czczid"].ToString()); this.BindData2(zc1, Request["czczid"].ToString()); zc1.Close(); } }
//判断某用户对某资产是否有维护的权限 public static bool IsZcMng(string zcid, string username) { bool result = false; U_ZCBU zc1 = new U_ZCBU(); DataSet ds1 = zc1.GetDetailByID(zcid, "zeren"); if (ds1.Tables[0].Rows.Count > 0) { if (ds1.Tables[0].Rows[0][0].ToString() == username) { result = true; } } zc1.Close(); return(result); }
//保存律师事务所资料 protected void SaveDataClick(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht["lssws"] = this.lssws.Text; ht["frdb"] = this.frdb.Text; ht["wtls"] = this.wtls.Text; ht["lxdh"] = this.lxdh.Text; ht["dwdz"] = this.dwdz.Text; ht["dzyj"] = this.dzyj.Text; U_ZCBU zc1 = new U_ZCBU(); zc1.UpDateZCDBInfo(Request["id"], ht); zc1.Close(); Comm.ShowInfo("【操作提示】:更新资料成功!", Request.RawUrl); }
//保存数据 private void SaveData1() { if (Request["id"] != null) { U_ZCBU zc3 = new U_ZCBU(); DataSet ds2 = zc3.GetDetailByID(Request["id"].ToString()); Hashtable ht1 = new Hashtable(); //foreach (string item in arr1) //{ // ht1[item] = ds2.Tables[0].Rows[0][item].ToString(); //} //foreach (string item in arr2) //{ // ht1[item] = ds2.Tables[0].Rows[0][item].ToString(); //} ht1["zcid"] = Request["id"].ToString(); ht1["xgr"] = User.Identity.Name; ht1["xgsj"] = DateTime.Now.ToString(); zc3.InsertOldZC(ht1); } Hashtable ht = new Hashtable(); //foreach (string item in arr1) //{ // ht[item] = Util.GetControlValue(this.zcbao.Parent.FindControl(item)); //} //foreach (string item in arr2) //{ // ht[item] = Util.GetControlValue(this.zcbao.Parent.FindControl(item)); //} ht.Remove("status"); ht.Remove("zhuang"); //提交数据保存 try { U_ZCBU zc1 = new U_ZCBU(); zc1.UpdateInfo(Request["id"], ht); zc1.Close(); this.BindOldZCInfo(); this.SetPageData(); Util.alert(this.Page, "操作提示:更新资料成功!"); } catch (Exception err1) { Util.alert(this.Page, "错误提示:更新资产数据失败,可能的原因是数据类型有错误,请检查【转入时间】日期,【本金利息】等为数值型后重新输入!"); } }
//增加新的资产方案审批表 protected void butNewData_Click(object sender, EventArgs e) { try { Hashtable ht = new Hashtable(); ht["zcid"] = Request["id"].ToString(); ht["status"] = "04"; U_ZCBU zc3 = new U_ZCBU(); zc3.InsertZcsbb(ht); zc3.Close(); Response.Redirect(Request.RawUrl, true); } catch { PubComm.ShowInfo("【系统错误】:数据库事务操作错误!", Request.RawUrl); } }
void AdvanceSearch1_OnMySearchClick(object sender, EventArgs e) { ZcMng1_AdvanceSearch search1 = sender as ZcMng1_AdvanceSearch; if (search1 != null) { List <SearchField> list1 = search1.SearchConditon; list1.Add(new SearchField("zeren", "null", SearchOperator.空值)); U_ZCBU Zc1 = new U_ZCBU(); DataSet ds1 = Zc1.GetSearchResult(list1); this.GridView1.DataSource = ds1; this.GridView1.DataBind(); ds1.Dispose(); Zc1.Close(); } }
//更新资产数据 protected void SaveDataClick(object sender, EventArgs e) { //设置更新字段 //String[] arr1 = new string[] { "danwei","zhwd","num1","num2","huobei","huilv","bj", // "sshy","quyu","guangxia","zcbao","bank","htnum", // "zzjg","jysfzc","clsj","zczb","dqjj","qygm","dwdz","dwfzr", // "qyjjxz","yxzzzk","xdri","dkffrq1","jklsh","dkye","dkffrq2","htdqr", // "zjycszje","zydbfs","dbrwmc","yyldxt","xcyqrq","jrblsj","fenlei","remark"}; String[] arr1 = new string[] { "danwei", "zhwd", "num1", "num2", "huobei", "huilv", "bj", "lx1", "lx2", "lx3", "sshy", "quyu", "guangxia", "zcbao", "bank", "htnum", "time0", "zzjg", "jysfzc", "clsj", "zczb", "dqjj", "qygm", "dwdz", "dwfzr", "qyjjxz", "yxzzzk", "xdri", "dkffrq1", "jklsh", "dkye", "dkffrq2", "htdqr", "zjycszje", "zydbfs", "dbrwmc", "yyldxt", "xcyqrq", "jrblsj", "fenlei", "remark" }; Hashtable ht = new Hashtable(); for (int i = 0; i < arr1.Length; i++) { if (this.zcbao.Parent.FindControl(arr1[i]) != null) { ht.Add(arr1[i], Util.GetControlValue(this.zcbao.Parent.FindControl(arr1[i]))); } } try { U_ZCBU zc1 = new U_ZCBU(); zc1.UpdateInfo(Request["id"], ht); zc1.Close(); //向直接领导发送邮件操作 string title = String.Format("用户{0}已修改了档案号为{1}的资产档案", User.Identity.Name, this.num2.Text); string remark = title + "<br><br><b><font color='#ff0000'>此邮件要求提交审阅意见</font></b>"; //PubComm.SendMailToLeader(title, remark,Request.RawUrl); PubComm.ShowInfo("操作提示:更新资料成功!", Request.RawUrl); } catch (Exception err) { Util.alert(this.Page, "错误提示:更新资产数据失败,可能的原因是数据类型有错误,请检查【转入时间】日期,【本金利息】等为数值型后重新输入!"); //Response.Write(err.ToString()); } }
private void BindData() { if (Request["id"] != null) { U_ZCTimeBU time1 = new U_ZCTimeBU(); DataSet ds1 = time1.GetTimeListByParentID(Request["id"]); this.Repeater1.DataSource = ds1; this.Repeater1.DataBind(); time1.Close(); ds1.Dispose(); string id = Request["id"]; U_ZCBU zc1 = new U_ZCBU(); DataSet ds = zc1.GetDetailByID(id, "danwei"); this.depart.Text = ds.Tables[0].Rows[0][0].ToString(); zc1.Close(); } }
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() { List <SearchField> list1 = (List <SearchField>)ViewState["SearchCondition"]; U_ZCBU zc1 = new U_ZCBU(); DataSet ds1 = zc1.GetSearchResult(list1); string zcid = ""; for (int i = 0; i < ds1.Tables[0].Rows.Count; i++) { if (i == 0) { zcid = ds1.Tables[0].Rows[i]["id"].ToString(); } else { zcid = zcid + "," + ds1.Tables[0].Rows[i]["id"].ToString(); } } this.zcid.Text = zcid; DataTable dt = ds1.Tables[0]; DataView dv1 = dt.DefaultView; dv1.Sort = "num2"; //DataView dv = dt.DefaultView; //dv.Sort = "num2"; this.GridView1.DataSource = dv1; this.GridView1.DataBind(); zc1.Close(); ds1.Dispose(); string[] str = (string[])ViewState["str"]; this.danwei.Text = str[0]; this.zcbao.Text = str[1]; this.depart.Text = str[2]; this.zeren.Text = str[3]; this.quyu.Text = str[4]; this.bstatus.Text = str[5]; this.hangye.Text = str[6]; this.fenlei.Text = str[7]; this.status.Text = str[8]; this.userkind.Text = str[9]; Session["zcid"] = this.zcid.Text; }
private void BindSSQK() { if (Request["zcid"] != null) { U_ZCBU zc2 = new U_ZCBU(); DataSet ds = zc2.GetZCDBInfoByID(Request["zcid"].ToString()); if (ds.Tables[0].Rows.Count > 0) { this.lssws.Text = ds.Tables[0].Rows[0]["lssws"].ToString(); this.frdb.Text = ds.Tables[0].Rows[0]["frdb"].ToString(); this.wtls.Text = ds.Tables[0].Rows[0]["wtls"].ToString(); this.lxdh.Text = ds.Tables[0].Rows[0]["lxdh"].ToString(); this.dwdz.Text = ds.Tables[0].Rows[0]["dwdz"].ToString(); this.dzyj.Text = ds.Tables[0].Rows[0]["dzyj"].ToString(); ds.Dispose(); } zc2.Close(); } }
private void BindDate() { if (Request["id"] != null) { string id = Request["id"].ToString(); U_ZCBU zc1 = new U_ZCBU(); DataSet ds = zc1.GetOldZCInfoByID(id); zc1.Close(); if (ds.Tables[0].Rows.Count > 0) { //设置管理员字段 for (int i = 0; i < arr1.Length; i++) { Util.SetControlValue(this.zcbao.Parent.FindControl(arr1[i]), ds.Tables[0].Rows[0][arr1[i]]); } } ds.Dispose(); } }
private void BindDate() { List <SearchField> list1 = new List <SearchField>(); string idlist = ViewState["id"].ToString(); string[] arr = idlist.Split(','); string temp = ""; for (int i = 0; i < arr.Length; i++) { if (i == 0) { temp = " id =" + arr[i]; } else { temp = temp + " or id =" + arr[i]; } } if (temp != "") { list1.Add(new SearchField("", temp, SearchOperator.用户定义)); } U_ZCBU zc1 = new U_ZCBU(); DataSet ds = zc1.GetSearchResult(list1); zc1.Close(); this.GridView1.DataSource = ds; foreach (DataRow dr in ds.Tables[0].Rows) { d1 = d1 + double.Parse(dr["bj"].ToString()); d2 = d2 + double.Parse(dr["lx1"].ToString()); } this.GridView1.DataBind(); //TableCell cell1=new TableCell(); //cell1.Text = "123456"; //this.GridView1.Rows[this.GridView1.Rows.Count-1].Cells.Add(cell1); 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_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_PayBU Pay1 = new CW_PayBU(); this.bill.Text = Pay1.GetBillNum(); Pay1.Close(); } this.billtime.Attributes["onfocus"] = "setday(this)"; } }
private void BindData() { if (Request["zcid"] != null) { string id = Request["zcid"]; U_ZCBU zc1 = new U_ZCBU(); DataSet ds = zc1.GetDetailByID(id, "depart,zeren,status,statusText,danwei"); zc1.Close(); 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(); this.status.Text = ds.Tables[0].Rows[0]["status"].ToString(); this.statusText.Text = ds.Tables[0].Rows[0]["statusText"].ToString(); if (this.statusText.Text == "") { this.statusText.Text = "阅卷"; } ds.Dispose(); } }
//调整用户自定义分类 protected void Button1_Click(object sender, EventArgs e) { U_ZCBU zc1 = new U_ZCBU(); zc1.SetUserKind(Request.QueryString["id"], Request.QueryString["kind"], this.userkind.SelectedValue); zc1.Close(); string info = "提示:替换用户自定义分类操作成功!"; if (Request.QueryString["kind"] == "21" || Request.QueryString["kind"] == "22") { info = "提示:追加用户自定义分类操作成功!"; } if (Request.QueryString["kind"] == "21" || Request.QueryString["kind"] == "11") { PubComm.ShowInfo(info, Application["root"] + "/ZcMng1/FixZcUserKind.aspx"); } else { PubComm.ShowInfo(info, Application["root"] + "/ZcMng1/MyFixZcUserKind.aspx"); } }
//增加资产数据 protected void Button1_Click(object sender, EventArgs e) { object[] obj1 = new object[] { danwei, bj, lx1, lx2, lx3, time0, zhuang, remark, htnum, bank, zhwd, num1, sshy, quyu, fenlei, userkind, zcbao, huobi, huilv, guangxia, }; string[] info = new string[] { "单位名称", "初始本金", "初始表内息", "初始表外息", "初始孳生利息", "转入时间" }; bool check = true; for (int i = 0; i < info.Length; i++) { if (Util.GetControlValue((Control)obj1[i]) == null || Util.GetControlValue((Control)obj1[i]) == "") { check = false; Util.alert(this.Page, "错误提示:【" + info[i] + "】栏目不能为空!"); break; } } // check true if (check) { try { Hashtable ht = new Hashtable(); Util.getPageData(obj1, ht); U_ZCBU zc1 = new U_ZCBU(); zc1.TabCommand.InsertData(ht); zc1.Close(); string url = Request.RawUrl; PubComm.ShowInfo("增加资产数据成功!", url, true); } catch { Util.alert(this.Page, "错误提示:增加资产数据失败,可能的原因是数据类型有错误,请检查【转入时间】日期,【本金利息】等为数值型后重新输入!"); } } }
//绑定资产调查数据 private void BindData() { if (Request["id"] != null) { string id = Request["id"]; U_ZCBU zc1 = new U_ZCBU(); DataSet ds = zc1.GetDetailByID(id, "depart,zeren,status,statusText,danwei,bj"); zc1.Close(); this.danwei.Text = ds.Tables[0].Rows[0]["danwei"].ToString(); this.status.Text = ds.Tables[0].Rows[0]["status"].ToString(); this.statusText.Text = ds.Tables[0].Rows[0]["statusText"].ToString(); if (this.status.Text == "00") { this.statusText.Text = "非现场调查(档案核查)"; } else if (this.status.Text == "01") { this.statusText.Text = "现场调查(抵质押物)"; } else if (this.status.Text == "02") { this.statusText.Text = "现场调查(保证人)"; } else if (this.status.Text == "03") { this.statusText.Text = "现场调查(借款人)"; } //this.depart.Text = ds.Tables[0].Rows[0]["depart"].ToString(); //this.zeren.Text = ds.Tables[0].Rows[0]["zeren"].ToString(); this.bj.Text = PubComm.GetNumberFormat(ds.Tables[0].Rows[0]["bj"].ToString()); ds.Dispose(); this.SetButton(); } }
protected void Repeater6_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.Item.FindControl("zccz") != null) { string id = ((Label)e.Item.FindControl("zccz")).Text; //删除资产处置方式 if (e.CommandName == "delete") { U_ZCBU zc3 = new U_ZCBU(); zc3.DelZCBFS(id); this.BindZCCZDetail(zc3); zc3.Close(); } else if (e.CommandName == "update") { Context.Items["id"] = id; if (Request["id"] != null) { Context.Items["zcid"] = Request["id"].ToString(); } Context.Items["czid"] = this.zcczid.Text; Server.Transfer("EditZcCzfs1.aspx", false); } else { U_ZCBSPBU sp1 = new U_ZCBSPBU(); bool first = sp1.CopyZcBCzczfstoZc(this.BID.Text, id); sp1.Close(); if (first) { Util.alert(this.Page, "恭喜您,复制成功!"); } else { Util.alert(this.Page, "很遗憾,复制失败!"); } } } }
private void Bind() { if (Request["id"] != null) { string id = Request["id"].ToString(); U_ZCBU zc1 = new U_ZCBU(); DataSet ds = zc1.GetZcsbbInfoByID(id); string[] arr1 = new string[] { "id", "zclx", "zcse", "xmbj", "fsxzly", "djyj" }; for (int i = 0; i < arr1.Length; i++) { if (ds.Tables[0].Rows.Count > 0) { Util.SetControlValue(this.zclx.Parent.FindControl(arr1[i]), ds.Tables[0].Rows[0][arr1[i]].ToString()); } } this.BindZCCZDetail(zc1); U_ZCSPBU sp1 = new U_ZCSPBU(); sp1.SetPC(this.pc1, id); sp1.Close(); zc1.Close(); } }
private void BindData() { if (Request["zcid"] != null) { string id = Request["zcid"]; U_ZCBU zc1 = new U_ZCBU(); DataSet ds = zc1.GetDetailByID(id); zc1.Close(); if (ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < arr1.Length; i++) { Util.SetControlValue(this.zcbao.Parent.FindControl(arr1[i]), ds.Tables[0].Rows[0][arr1[i]]); } if (ds.Tables[0].Rows[0]["time0"] != DBNull.Value) { string dt = DateTime.Parse(ds.Tables[0].Rows[0]["time0"].ToString()).ToString("yyyy-MM-dd"); Util.SetControlValue(this.zcbao.Parent.FindControl("time0"), dt); } if (ds.Tables[0].Rows[0]["status"] != DBNull.Value) { string st = ds.Tables[0].Rows[0]["statusText"].ToString(); Util.SetControlValue(this.zcbao.Parent.FindControl("status"), st); } //设置数字金额的显示 string[] num1 = new string[] { "bj", "lx1", "lx2", "lx3", "zczb" }; for (int i = 0; i < num1.Length; i++) { Label l1 = this.bj.Parent.FindControl(num1[i]) as Label; if (l1 != null) { l1.Text = Comm.GetNumberFormat(l1.Text); } } } ds.Dispose(); } }
private void BindData() { if (Request["id"] != null) { string id = Request["id"]; U_ZCBU zc1 = new U_ZCBU(); string fs = "danwei,depart,zeren,bj,lx,pbj,plx,fee1,fee2,fee3,fee4,fee5,fee6,fee7,fee8,fee9,fee10,fee11,fee12,bjye,lxye,hbxh,bxhjye,fyhj"; DataSet ds = zc1.GetDetailByID(id, "danwei,depart,zeren,bj,pbj,plx,fee1,fee2,fee3,fee4,fee5,fee6,fee7,fee8,fee9,fee10,fee11,fee12,isnull(bj,0)-isnull(pbj,0) as bjye ,isnull(lx1,0)+isnull(lx2,0)+isnull(lx3,0)-plx as lxye,isnull(pbj,0)+isnull(plx,0) as hbxh,isnull(bj,0)+isnull(lx1,0)+isnull(lx2,0)+isnull(lx3,0)-isnull(pbj,0)-isnull(plx,0) as bxhjye,isnull(fee1,0)+isnull(fee2,0)+isnull(fee3,0)+isnull(fee4,0)+isnull(fee5,0)+isnull(fee6,0)+isnull(fee7,0)+isnull(fee8,0)+isnull(fee9,0)+isnull(fee10,0)+isnull(fee11,0)+isnull(fee12,0)+isnull(fee13,0)+isnull(fee14,0)+isnull(fee15,0)+isnull(fee16,0)+isnull(fee17,0)+isnull(fee18,0)+isnull(fee19,0)+isnull(fee20,0) as fyhj,isnull(lx1,0)+isnull(lx2,0)+isnull(lx3,0) as lx"); zc1.Close(); string[] AF = fs.Split(','); if (ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < AF.Length; i++) { Util.SetControlValue(this.pbj.Parent.FindControl(AF[i]), ds.Tables[0].Rows[0][AF[i]]); } } //设置数字金额的显示 string[] num1 = new string[] { "pbj", "plx", "fee1", "fee2", "fee3", "fee4", "fee5", "fee6", "fee7", "fee8", "fee9", "fee10", "fee11", "fee12", "bjye", "lxye", "hbxh", "bxhjye", "fyhj" }; for (int i = 0; i < num1.Length; i++) { Label l1 = this.pbj.Parent.FindControl(num1[i]) as Label; if (l1 != null) { l1.Text = Comm.GetNumberFormat(l1.Text); } } ds.Dispose(); if (Comm.IsRole("系统管理员")) { this.Button2.Visible = true; } else { this.Button2.Visible = false; } } }
private void Bind() { if (Request["czid"] != null && Request["pc"] != null) { string czid = Request["czid"].ToString(); string pc = Request["pc"].ToString(); U_ZCSPBU sp1 = new U_ZCSPBU(); DataSet ds1 = sp1.GetZcSPListByPC(czid, pc); this.Repeater1.DataSource = ds1; this.Repeater1.DataBind(); sp1.Close(); U_ZCBU zc1 = new U_ZCBU(); DataSet ds2 = zc1.GetShenBaoInfo(Request["czid"]); zc1.Close(); this.lab1.Text = ds2.Tables[0].Rows[0]["xmsbh"].ToString(); this.lab2.Text = ds2.Tables[0].Rows[0]["num2"].ToString(); this.lab3.Text = ds2.Tables[0].Rows[0]["danwei"].ToString(); } }
void AdvanceSearch1_OnMySearchClick(object sender, EventArgs e) { ZcMng1_AdvanceSearch search1 = sender as ZcMng1_AdvanceSearch; if (search1 != null) { int totalRow = 0; int curpage = 1; List <SearchField> list1 = search1.SearchConditon; list1.Add(new SearchField("zeren", "null", SearchOperator.非空值)); U_ZCBU Zc1 = new U_ZCBU(); DataSet ds1 = Zc1.GetSearchResult(list1); DataView dv = ds1.Tables[0].DefaultView; dv.Sort = "num2"; this.GridView1.DataSource = dv; this.GridView1.DataBind(); ds1.Dispose(); Zc1.Close(); } }
void AdvanceSearch1_OnMySearchClick(object sender, EventArgs e) { ZcMng1_AdvanceSearch search1 = sender as ZcMng1_AdvanceSearch; if (search1 != null) { int totalRow = 0; int curpage = 1; List <SearchField> list1 = search1.SearchConditon; U_ZCBU Zc1 = new U_ZCBU(); DataSet ds1 = Zc1.GetZcUserkingList(list1, curpage, -1, out totalRow); this.GridView1.DataSource = ds1; this.GridView1.DataBind(); ds1.Dispose(); Zc1.Close(); this.PageNavigator1.TotalRows = totalRow; this.PageNavigator1.CurrentPage = curpage; } }
protected void SaveDataClick(object sender, EventArgs e) { Hashtable ht = new Hashtable(); foreach (string item in arr1) { ht[item] = Util.GetControlValue(this.sszl.Parent.FindControl(item)); } try { U_ZCBU zc1 = new U_ZCBU(); ht["id"] = Request["id"]; zc1.UpDateZCSSInfo(Request["id"], ht); zc1.Close(); Util.alert(this.Page, "操作提示:更新资料成功!"); } catch (Exception err1) { Util.alert(this.Page, "错误提示:更新资产数据失败,可能的原因是数据类型有错误,请检查重新输入!"); } }
protected void SaveDataClick(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht["zcid"] = ViewState["zcid"].ToString(); ht["czid"] = ViewState["czid"].ToString(); ht["czfs"] = this.czfs.Text; if (this.czjg.Text != "") { ht["czjg"] = this.czjg.Text; } if (this.czss.Text != "") { ht["czss"] = this.czss.Text; } if (this.qcl.Text != "") { ht["qcl"] = this.qcl.Text; } if (this.yjfy.Text != "") { ht["yjfy"] = this.yjfy.Text; } U_ZCBU zc2 = new U_ZCBU(); if (ViewState["id"] == null) { zc2.InsertCZFS(ht); } else { zc2.UpdateCZFSInfo(ViewState["id"].ToString(), ht); } zc2.Close(); Response.Redirect("ZcDetail3.aspx?id=" + ViewState["zcid"].ToString(), true); }
//上传长江资产公司不良贷款逐户调查表.doc protected void Button1_Click(object sender, EventArgs e) { if (this.FileUpload1.FileName != null && this.FileUpload1.PostedFile.ContentLength > 0) { string filename = null; if (this.OldFileName.Value == "") { filename = Request["zcid"].ToString() + "_" + Util.GetRandomString(9) + "_" + this.FileUpload1.FileName; this.OldFileName.Value = filename; } else { filename = this.OldFileName.Value; } string filename1 = Server.MapPath("~/Common/AttachFiles/") + filename; this.FileUpload1.SaveAs(filename1); //保存文件到系统 //更新数据库中的数据 if (this.OldFileName.Value != "") { Hashtable ht = new Hashtable(); ht["tcdoc"] = this.OldFileName.Value; U_ZCBU zc1 = new U_ZCBU(); zc1.UpdateInfo(Request["zcid"].ToString(), ht); zc1.Close(); } //////////////////////////////////////// Util.alert(this.Page, "文件上传成功,请关闭当前窗口!"); } else { Util.alert(this.Page, "错误提示:请选择一个【不良资产逐户调查表】文件上传!"); } }
//绑定当前资产-处置申报情况(包括处置方式) private void BindData() { if (Request["id"] != null) { string id = Request["id"]; U_ZCBU zc1 = new U_ZCBU(); ////////////////////////////////////////// Hashtable ht = zc1.GetCurrentZcBCZbyID(id); if (ht.Count > 0) { this.danwei.Text = ht["bname"].ToString(); this.BID.Text = ht["id"].ToString(); if (ht["depart"] != null) { this.depart.Text = ht["depart"].ToString(); } if (ht["bzeren"] != null) { this.zeren.Text = ht["bzeren"].ToString(); } if (ht["zcstatus"] != null) { this.status.Text = ht["zcstatus"].ToString(); } if (ht["statustext"] != null) { this.statusText.Text = ht["statustext"].ToString(); } if (this.statusText.Text == "") { this.statusText.Text = "阅卷"; } if (ht["xmsbh"] != null) { this.xmsbh.Text = ht["xmsbh"].ToString(); } //根据权限显示信息 int status1 = 0; if (this.status.Text != "") { status1 = Int32.Parse(this.status.Text); } string[] arr1 = new string[] { "zclx", "zcse", "xmbj", "fsxzly", "djyj", "zcczid" }; for (int i = 0; i < arr1.Length; i++) { if (ht[arr1[i]] != null) { Util.SetControlValue(this.zclx.Parent.FindControl(arr1[i]), ht[arr1[i]].ToString()); Util.SetControlValue(this.zclx.Parent.FindControl(arr1[i] + "_1"), Util.ChangeToShow(ht[arr1[i]].ToString())); } if (this.owner && status1 == (int)SP.开始审批) { this.zclx.Parent.FindControl(arr1[i] + "_1").Visible = false; } else { this.zclx.Parent.FindControl(arr1[i]).Visible = false; } } //////////////////////////////////////////// this.zclx.Parent.FindControl("zcczid").Visible = true; this.BindZCCZDetail(zc1); } zc1.Close(); this.SetButton(); //设置按钮的权限 } }