protected void Btn_Delete_Click(object sender, EventArgs e) { BP.Sys.MapExt ext = new BP.Sys.MapExt(); ext.MyPK = ext.ExtType + "_" + this.FK_MapData + "_" + this.RefNo; ext.Delete(); BP.Sys.PubClass.WinClose(); }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack == false) { string fk_mapdata = this.Request.QueryString["FK_MapData"]; string RefNo = this.Request.QueryString["RefNo"]; BP.Sys.MapExt ext = new BP.Sys.MapExt(); ext.MyPK = this.ExtType + this.FK_MapData + "_" + this.RefNo; ext.RetrieveFromDBSources(); this.TB_SQL.Text = ext.Doc; ArrayList arr = new ArrayList(); SysEnums ens = new SysEnums("DBSrcType"); foreach (SysEnum en in ens) { arr.Add(en.Lab); } switch (ext.FK_DBSrc) { case "1": this.DDL_DBSrc.SelectedValue = "SQLServer数据库"; break; case "100": this.DDL_DBSrc.SelectedValue = "WebService数据源"; break; case "2": this.DDL_DBSrc.SelectedValue = "Oracle数据库"; break; case "3": this.DDL_DBSrc.SelectedValue = "MySQL数据库"; break; case "4": this.DDL_DBSrc.SelectedValue = "Informix数据库"; break; default: this.DDL_DBSrc.SelectedValue = "应用系统主数据库(默认)"; break; } this.DDL_DBSrc.DataSource = arr; this.DDL_DBSrc.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (this.Request.QueryString["REID"] != null) { RegularExpressionDtls reDtls = new RegularExpressionDtls(); reDtls.RetrieveAll(); //删除现有的逻辑. BP.Sys.MapExts exts = new BP.Sys.MapExts(); exts.Delete(MapExtAttr.AttrOfOper, this.KeyOfEn, MapExtAttr.ExtType, BP.Sys.MapExtXmlList.RegularExpression); // 开始装载. foreach (RegularExpressionDtl dtl in reDtls) { if (dtl.ItemNo != this.Request.QueryString["REID"]) { continue; } BP.Sys.MapExt ext = new BP.Sys.MapExt(); ext.MyPK = this.FK_MapData + "_" + this.KeyOfEn + "_" + MapExtXmlList.RegularExpression + "_" + dtl.ForEvent; ext.FK_MapData = this.FK_MapData; ext.AttrOfOper = this.KeyOfEn; ext.Doc = dtl.Exp; //表达公式. ext.Tag = dtl.ForEvent; //时间. ext.Tag1 = dtl.Msg; //消息 ext.ExtType = MapExtXmlList.RegularExpression; // 表达公式 . ext.Insert(); } //this.WinClose("1"); //关闭并返回一个值。 return; } RegularExpressions res = new RegularExpressions(); res.RetrieveAll(); this.Pub1.AddH3("事件模版-点击名称选用它."); this.Pub1.AddHR(); this.Pub1.AddUL(); foreach (RegularExpression item in res) { this.Pub1.AddLi("<a href=\"javascript:DoIt('" + this.FK_MapData + "','" + this.KeyOfEn + "','" + this.ForCtrl + "','" + item.No + "','" + item.Name + "');\" >" + item.Name + "</a> - " + item.Note); } this.Pub1.AddULEnd(); }
protected void Btn_Save_Click(object sender, EventArgs e) { BP.Sys.MapExt ext = new BP.Sys.MapExt(); ext.MyPK = this.ExtType + this.FK_MapData + "_" + this.RefNo; ext.RetrieveFromDBSources(); ext.FK_MapData = this.FK_MapData; ext.Doc = this.TB_SQL.Text; ext.AttrOfOper = this.RefNo; ext.ExtType = "AutoFullDLL"; switch (this.DDL_DBSrc.Text) { case "应用系统主数据库(默认)": ext.FK_DBSrc = "0"; break; case "SQLServer数据库": ext.FK_DBSrc = "1"; break; case "WebService数据源": ext.FK_DBSrc = "100"; break; case "Oracle数据库": ext.FK_DBSrc = "2"; break; case "MySQL数据库": ext.FK_DBSrc = "3"; break; case "Informix数据库": ext.FK_DBSrc = "4"; break; default: break; } ext.Save(); }
/// <summary> /// 2016.4.19 by liuhui. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { if (this.IsPostBack == false) { //实例化控件值. BP.Sys.MapExt ext = new BP.Sys.MapExt(); int i = ext.Retrieve(BP.Sys.MapExtAttr.FK_MapData, FK_MapData, BP.Sys.MapExtAttr.ExtType, "PopVal", BP.Sys.MapExtAttr.AttrOfOper, RefNo); if (i == 0) { this.Btn_Delete.Visible = false; } else { this.Btn_Delete.Visible = true; } #region 给控件赋值. 2016.4.19 by liuhui. // 工作模式 0 -url .1-内置 if (ext.PopValWorkModel == 1) { this.RB_Model_Inntel.Checked = true; } else { this.RB_Model_Url.Checked = true; } // 数据呈现方式 if (ext.PopValShowModel == 0) { this.RB_Table.Checked = true; } else { this.RB_Tree.Checked = true; } //选择数据方式 if (ext.PopValSelectModel == 0) { this.RB_PopValSelectModel_0.Checked = true; } else { this.RB_PopValSelectModel_1.Checked = true; } if (ext.PopValFormat == 0) { this.RB_PopValFormat_0.Checked = true; } if (ext.PopValFormat == 1) { this.RB_PopValFormat_1.Checked = true; } if (ext.PopValFormat == 2) { this.RB_PopValFormat_2.Checked = true; } //数据源分组sql this.TB_Group.Text = ext.Tag1; //数据源sql this.TB_Entity.Text = ext.Tag2; // rul this.TB_URL.Text = ext.Doc; #endregion 给控件赋值. } }
protected void Btn_Save_Click(object sender, EventArgs e) { //查询出实体. BP.Sys.MapExt ext = new BP.Sys.MapExt(); ext.Retrieve(BP.Sys.MapExtAttr.FK_MapData, FK_MapData, BP.Sys.MapExtAttr.ExtType, "PopVal", BP.Sys.MapExtAttr.AttrOfOper, RefNo); // 工作模式 0 -url .1-内置 if (this.RB_Model_Inntel.Checked) { ext.PopValWorkModel = 1; } else { ext.PopValWorkModel = 0; } // 数据呈现方式 if (this.RB_Table.Checked) { ext.PopValShowModel = 0; } else { ext.PopValShowModel = 1; } //选择数据方式 if (this.RB_PopValSelectModel_0.Checked) { ext.PopValSelectModel = 0; } else { ext.PopValSelectModel = 1; } //返回值格式 if (this.RB_PopValFormat_0.Checked) { ext.PopValFormat = 0; } if (this.RB_PopValFormat_1.Checked) { ext.PopValFormat = 1; } if (this.RB_PopValFormat_2.Checked) { ext.PopValFormat = 2; } //数据源分组sql if (!string.IsNullOrEmpty(this.TB_Group.Text)) { ext.Tag1 = this.TB_Group.Text; } else { ext.Tag1 = ""; } //数据源sql if (!string.IsNullOrEmpty(this.TB_Entity.Text)) { ext.Tag2 = this.TB_Entity.Text; } else { ext.Tag2 = ""; } //URL if (string.IsNullOrEmpty(this.TB_URL.Text) == false) { ext.Doc = this.TB_URL.Text; } else { ext.Doc = ""; } //操作的文本框 ext.AttrOfOper = this.RefNo; ext.ExtType = MapExtXmlList.PopVal; ext.FK_MapData = this.FK_MapData; ext.MyPK = ext.ExtType + "_" + this.FK_MapData + "_" + ext.AttrOfOper; ext.Save(); }
public void btn_SaveReTemplete_Click(object sender, EventArgs e) { ListBox lb = this.Pub1.FindControl("LBReTemplete") as ListBox; if (lb == null && lb.SelectedItem.Value == null) { return; } string newMyPk = ""; RegularExpressionDtls reDtls = new RegularExpressionDtls(); reDtls.RetrieveAll(); //删除现有的逻辑. BP.Sys.MapExts exts = new BP.Sys.MapExts(); string[] strs = this.RefNo.Split(','); foreach (string field in strs) { if (string.IsNullOrEmpty(field) == true) { continue; } exts.Delete(MapExtAttr.FK_MapData, this.FK_MapData, MapExtAttr.AttrOfOper, field, MapExtAttr.ExtType, BP.Sys.MapExtXmlList.RegularExpression); } // 开始装载. foreach (RegularExpressionDtl dtl in reDtls) { if (dtl.ItemNo != lb.SelectedItem.Value) { continue; } foreach (string field in strs) { if (string.IsNullOrEmpty(field) == true) { continue; } BP.Sys.MapExt ext = new BP.Sys.MapExt(); ext.MyPK = this.FK_MapData + "_" + field + "_" + MapExtXmlList.RegularExpression + "_" + dtl.ForEvent; ext.FK_MapData = this.FK_MapData; ext.AttrOfOper = field; ext.Doc = dtl.Exp; //表达公式. ext.Tag = dtl.ForEvent; //时间. ext.Tag1 = dtl.Msg; //消息 ext.ExtType = MapExtXmlList.RegularExpression; // 表达公式 . ext.Insert(); newMyPk = ext.MyPK; } } if (this.RefNo != null && this.RefNo.Contains(",")) { this.WinCloseWithMsg("已经保存成功."); return; } else { this.Response.Redirect("RegularExpression.aspx?FK_MapData=" + this.FK_MapData + "&RefNo=" + this.RefNo + "&ExtType=" + this.ExtType + "&MyPK=" + newMyPk + "&OperAttrKey=" + this.OperAttrKey + "&DoType=New", true); } }