コード例 #1
0
 protected void Btn_Del_Click(object sender, EventArgs e)
 {
     BP.Sys.MapExt me = new MapExt();
     me.MyPK = this.MyPK;
     me.Delete();
     this.WinClose("删除成功.");
 }
コード例 #2
0
        public void BindRegularExpressionEdit_ClickSave(string myEvent)
        {
            string[] fields = this.RefNo.Split(',');
            foreach (string filed in fields)
            {
                if (string.IsNullOrEmpty(filed))
                {
                    continue;
                }

                MapExt me = new MapExt();
                me.FK_MapData = this.FK_MapData;
                me.ExtType    = this.ExtType;
                me.Tag        = myEvent;
                me.AttrOfOper = filed;
                me.MyPK       = this.FK_MapData + "_" + filed + "_" + me.ExtType + "_" + me.Tag;
                me.Delete();

                me.Doc  = this.Pub1.GetTextBoxByID("TB_Doc_" + myEvent).Text;
                me.Tag1 = this.Pub1.GetTextBoxByID("TB_Tag1_" + myEvent).Text;
                if (me.Doc.Trim().Length == 0)
                {
                    return;
                }
                me.Insert();
            }
        }
コード例 #3
0
        /// <summary>
        /// 保存它
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void btn_SavePageLoadFull_Click(object sender, EventArgs e)
        {
            MapExt me = new MapExt();

            me.MyPK       = this.FK_MapData + "_" + MapExtXmlList.PageLoadFull;
            me.FK_MapData = this.FK_MapData;
            me.ExtType    = MapExtXmlList.PageLoadFull;
            me.RetrieveFromDBSources();

            me.Tag = this.Pub1.GetTextBoxByID("TB_" + MapExtAttr.Tag).Text;
            string  sql  = "";
            MapDtls dtls = new MapDtls(this.FK_MapData);

            foreach (MapDtl dtl in dtls)
            {
                sql += "*" + dtl.No + "=" + this.Pub1.GetTextBoxByID("TB_" + dtl.No).Text;
            }
            me.Tag1 = sql;

            me.MyPK = this.FK_MapData + "_" + MapExtXmlList.PageLoadFull;

            string info = me.Tag1 + me.Tag;

            if (string.IsNullOrEmpty(info))
            {
                me.Delete();
            }
            else
            {
                me.Save();
            }
        }
コード例 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Title = this.Lab;

            switch (this.DoType)
            {
            case "Del":
                MapExt mm = new MapExt();
                mm.MyPK = this.MyPK;
                mm.Retrieve();
                mm.Delete();
                this.Response.Redirect("InputCheck.aspx?FK_MapData=" + this.FK_MapData + "&ExtType=" + this.ExtType + "&RefNo=" + this.RefNo, true);
                return;

            default:
                break;
            }

            if (this.MyPK != null || this.DoType == "New")
            {
                Edit_InputCheck();
                return;
            }

            MapExts mes = new MapExts();

            mes.Retrieve(MapExtAttr.ExtType, this.ExtType,
                         MapExtAttr.FK_MapData, this.FK_MapData);
            this.MapJS(mes);
        }
コード例 #5
0
        public string AutoFullDtlField_Delete()
        {
            MapExt me = new MapExt();

            me.Delete(MapExtAttr.ExtType, MapExtXmlList.AutoFullDtlField,
                      MapExtAttr.FK_MapData, this.FK_MapData,
                      MapExtAttr.AttrOfOper, this.KeyOfEn);

            return("删除成功.");
        }
コード例 #6
0
        public string ActiveDDL_Delete()
        {
            MapExt me = new MapExt();

            me.Delete(MapExtAttr.ExtType, MapExtXmlList.ActiveDDL,
                      MapExtAttr.FK_MapData, this.FK_MapData,
                      MapExtAttr.AttrOfOper, this.KeyOfEn);

            return("删除成功.");
        }
コード例 #7
0
        public string DDLFullCtrl_Delete()
        {
            MapExt me = new MapExt();

            me.Delete(MapExtAttr.ExtType, MapExtXmlList.DDLFullCtrl,
                      MapExtAttr.FK_MapData, this.FK_MapData,
                      MapExtAttr.AttrOfOper, this.KeyOfEn);

            return("删除成功.");
        }
コード例 #8
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Btn_Delete_Click(object sender, EventArgs e)
        {
            MapExt me = new MapExt();

            me.Retrieve(MapExtAttr.FK_MapData, this.FK_MapData, MapExtAttr.ExtType, this.ExtType, MapExtAttr.AttrOfOper, this.RefNo);
            me.Doc = "";
            me.Delete();

            BP.Sys.PubClass.WinClose();
        }
コード例 #9
0
        void btn_SaveAutoFull_Click(object sender, EventArgs e)
        {
            MapExt me = new MapExt();

            //删除指定的数据,避免插入重复.
            me.Delete(MapExtAttr.FK_MapData, this.FK_MapData, MapExtAttr.ExtType, this.ExtType, MapExtAttr.AttrOfOper, this.RefNo);

            me.MyPK = this.MyPK;
            if (me.MyPK.Length > 2)
            {
                me.RetrieveFromDBSources();
            }

            me            = (MapExt)this.Pub1.Copy(me);
            me.ExtType    = this.ExtType;
            me.Doc        = this.Pub1.GetTextBoxByID("TB_Doc").Text;
            me.AttrOfOper = this.RefNo;
            me.FK_MapData = this.FK_MapData;
            me.MyPK       = this.FK_MapData + "_" + me.ExtType + "_" + me.AttrOfOper;
            try
            {
                //DataTable dt = BP.DA.DBAccess.RunSQLReturnTable(me.Doc);
                //if (string.IsNullOrEmpty(me.Tag) == false)
                //{
                //    dt = BP.DA.DBAccess.RunSQLReturnTable(me.Tag);
                //    if (dt.Columns.Contains("Name") == false || dt.Columns.Contains("No") == false)
                //        throw new Exception("在您的sql表达式里,必须有No,Name 还两个列。");
                //}

                //if (this.ExtType == MapExtXmlList.TBFullCtrl)
                //{
                //    if (dt.Columns.Contains("Name") == false || dt.Columns.Contains("No") == false)
                //        throw new Exception("在您的sql表达式里,必须有No,Name 还两个列。");
                //}

                //MapAttrs attrs = new MapAttrs(this.FK_MapData);
                //foreach (DataColumn dc in dt.Columns)
                //{
                //    if (dc.ColumnName.ToLower() == "no" || dc.ColumnName.ToLower() == "name")
                //        continue;

                //    if (attrs.Contains(MapAttrAttr.KeyOfEn, dc.ColumnName) == false)
                //        throw new Exception("@系统没有找到您要匹配的列(" + dc.ColumnName + "),注意:您要指定的列名区分大小写。");
                //}
                me.Save();
            }
            catch (Exception ex)
            {
                this.Pub1.AlertMsg_Warning("SQL错误", ex.Message);
                return;
            }
            this.Response.Redirect("TBFullCtrl.aspx?FK_MapData=" + this.FK_MapData + "&RefNo=" + this.RefNo + "&MyPK=" + this.MyPK + "", true);
        }
コード例 #10
0
        void btn_Del_Click(object sender, EventArgs e)
        {
            MapExt me = new MapExt();

            // me.MyPK = this.FK_MapData + "_" + this.ExtType + "_" + me.AttrOfOper + "_" + me.AttrsOfActive;
            me.Delete(MapExtAttr.FK_MapData, this.FK_MapData, MapExtAttr.ExtType, MapExtXmlList.ActiveDDL,
                      MapExtAttr.AttrOfOper, this.RefNo);

            //关闭.
            BP.Sys.PubClass.Alert("删除成功.");
            BP.Sys.PubClass.WinClose();
        }
コード例 #11
0
        /// <summary>
        /// 执行 保存.
        /// </summary>
        /// <returns></returns>
        public string RegularExpression_Save()
        {
            //删除该字段的全部扩展设置.
            MapExt me = new MapExt();

            me.Delete(MapExtAttr.FK_MapData, this.FK_MapData,
                      MapExtAttr.ExtType, MapExtXmlList.RegularExpression,
                      MapExtAttr.AttrOfOper, this.KeyOfEn);

            //执行存盘.
            RegularExpression_Save_Tag("onblur");
            RegularExpression_Save_Tag("onchange");
            RegularExpression_Save_Tag("onclick");
            RegularExpression_Save_Tag("ondblclick");
            RegularExpression_Save_Tag("onkeypress");
            RegularExpression_Save_Tag("onkeyup");
            RegularExpression_Save_Tag("onsubmit");


            return("保存成功...");
        }
コード例 #12
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <returns></returns>
        public string ActiveDDL_Save()
        {
            MapExt me = new MapExt();

            me.Delete(MapExtAttr.ExtType, MapExtXmlList.ActiveDDL,
                      MapExtAttr.FK_MapData, this.FK_MapData,
                      MapExtAttr.AttrOfOper, this.KeyOfEn);

            me.FK_MapData    = this.FK_MapData;
            me.AttrOfOper    = this.KeyOfEn;
            me.AttrsOfActive = this.GetValFromFrmByKey("DDL_AttrsOfActive");
            me.FK_DBSrc      = this.GetValFromFrmByKey("FK_DBSrc");
            me.Doc           = this.GetValFromFrmByKey("TB_Doc"); //要执行的SQL.
            me.ExtType       = MapExtXmlList.ActiveDDL;

            //执行保存.
            me.MyPK = MapExtXmlList.ActiveDDL + "_" + me.FK_MapData + "_" + me.AttrOfOper + "_" + me.AttrOfOper;
            me.Save();

            return("保存成功.");
        }