protected void ddl_yzjb_SelectedIndexChanged(object sender, EventArgs e) { if (this.ddl_yzjb.SelectedIndex == 0) { this.txtReceiverIds.Text = ","; this.db_Jbmc.Text = ""; this.db_Jbnr.Text = ""; this.db_fsdx.Text = ""; this.db_newSxr.Text = ""; Src = "Txl_Tree.aspx?dxjbId="; return; } Src = "Txl_Tree.aspx?type=dxjb&dxjbId=" + this.ddl_yzjb.SelectedValue; DataTable dt = BLL.ReadSzgkjc_Dxjb(this.ddl_yzjb.SelectedValue).Result; List <IDataItem> list = dt.Rows[0].ToDataItem(); this.SetControlValue(list); string jbnr = list.GetDataItem("Jbnr").ItemData; string jbnrNew = string.Copy(jbnr); List <SqlPara> sqls = WebCommon.ConvertSql(jbnr); if (sqls.Count > 0) { foreach (SqlPara item in sqls) { string str = BLL.ExecuteSql(item.executeSql); item.newStr = str; jbnrNew = jbnrNew.Replace(item.oldStr, item.newStr); } } this.db_Jbnr.Text = jbnrNew; dt = BLL.ReadSzgkjc_DxjbAndSjml(this.ddl_yzjb.SelectedValue).Result; if (dt.Rows.Count > 0) { string txt = "", txt2 = ""; foreach (DataRow item in dt.Rows) { txt += "," + item["SjmlID"]; txt2 += item["SjmlName"] + "【" + item["sjmlMobile"] + "】,"; } this.txtReceiverIds.Text = txt; this.db_fsdx.Text = txt2.Trim(new char[] { ',' }); } }
protected void Page_Load(object sender, EventArgs e) { DxjbId = Request.QueryString["dxjbId"]; BLL = new ZlctBLL(this.WorkUser); if (!this.IsPostBack) { PageIndex = Request.QueryString["pageIndex"]; this.lblPageIndex.Text = PageIndex; DataTable dt = BLL.ReadSzgkjc_Dxjb(DxjbId).Result; List <IDataItem> list = dt.Rows[0].ToDataItem(); this.SetControlValue(list); bool isDsfs = bool.Parse(dt.Rows[0]["IsDsfs"].ToString()); if (isDsfs) { this.db_fslx.Text = "定时发送"; } else { this.db_fslx.Text = "手动发送"; } int month = 0, week = 0, quarter = 0; week = int.Parse(dt.Rows[0]["EveryWeekOne"].ToString2()); month = int.Parse(dt.Rows[0]["EveryMonthOne"].ToString2()); quarter = int.Parse(dt.Rows[0]["EveryQuarterOne"].ToString2()); if (week > 0) { this.db_fszq.Text = "每周发送一次,"; } if (month > 0) { this.db_fszq.Text += "每月发送一次,"; } if (quarter > 0) { this.db_fszq.Text += "每季度发送一次"; } this.db_fszq.Text = this.db_fszq.Text.TrimEnd(','); string jbnr = list.GetDataItem("Jbnr").ItemData; string jbnrNew = string.Copy(jbnr); List <SqlPara> sqls = WebCommon.ConvertSql(jbnr); if (sqls.Count > 0) { foreach (SqlPara item in sqls) { string str = BLL.ExecuteSql(item.executeSql); item.newStr = str; jbnrNew = jbnrNew.Replace(item.oldStr, item.newStr); } } this.db_Jbnr.Text = jbnrNew; dt = BLL.ReadSzgkjc_DxjbAndSjml(DxjbId).Result; if (dt.Rows.Count > 0) { string txt = ",", txt2 = ""; foreach (DataRow item in dt.Rows) { txt += item["SjmlID"] + ","; txt2 += item["SjmlName"] + "【" + item["sjmlMobile"] + "】,"; } this.db_fsdx.Text = txt2.Trim(new char[] { ',' }); } } }
protected void Page_Load(object sender, EventArgs e) { Operate = Request.QueryString["operate"]; DxjbId = Request.QueryString["dxjbId"]; PageIndex = Request.QueryString["pageIndex"]; Src = "Txl_Tree.aspx?type=dxjb&dxjbId=" + DxjbId; BLL = new ZlctBLL(this.WorkUser); if (!this.IsPostBack) { this.lblPageIndex.Text = PageIndex; if (Operate == "edit") { content = "短信简报修改"; DataTable dt = BLL.ReadSzgkjc_Dxjb(DxjbId).Result; List <IDataItem> list = dt.Rows[0].ToDataItem(); this.SetControlValue(list); if (list.GetDataItem("EveryWeekOne").ItemData.ToInt32(0) > 0) { this.db_dsfs_1.Checked = true; } else if (list.GetDataItem("EveryMonthOne").ItemData.ToInt32(0) > 0) { this.db_dsfs_2.Checked = true; } else if (list.GetDataItem("EveryQuarterOne").ItemData.ToInt32(0) > 0) { this.db_dsfs_3.Checked = true; } dt = BLL.ReadSzgkjc_DxjbAndSjml(DxjbId).Result; if (dt.Rows.Count > 0) { string txt = ",", txt2 = ""; foreach (DataRow item in dt.Rows) { txt += item["SjmlID"] + ","; txt2 += item["SjmlName"] + "【" + item["sjmlMobile"] + "】,"; } this.txtReceiverIds.Text = txt; this.db_fsdx.Text = txt2.Trim(new char[] { ',' }); } if (!this.db_IsDsfs.Checked) { this.db_dsfs_1.Enabled = false; this.db_dsfs_2.Enabled = false; this.db_dsfs_3.Enabled = false; } else { this.db_dsfs_1.Enabled = true; this.db_dsfs_2.Enabled = true; this.db_dsfs_3.Enabled = true; } } else { content = "预制短信简报"; this.txtReceiverIds.Text = ","; if (db_IsDsfs.Checked) { this.db_dsfs_1.Enabled = true; this.db_dsfs_2.Enabled = true; this.db_dsfs_3.Enabled = true; } else { this.db_dsfs_1.Enabled = false; this.db_dsfs_2.Enabled = false; this.db_dsfs_3.Enabled = false; } } //db_IsDsfs_CheckedChanged(sender,e); } }