示例#1
0
        protected override void afterInsertUpdateAction()
        {
            BP.Sys.FrmBtn frmBtn = new BP.Sys.FrmBtn();
            frmBtn.MyPK = this.MyPK;
            frmBtn.RetrieveFromDBSources();
            frmBtn.Update();

            //调用frmEditAction, 完成其他的操作.
            BP.Sys.CCFormAPI.AfterFrmEditAction(this.FK_MapData);

            base.afterInsertUpdateAction();
        }
示例#2
0
        public static void SaveButton(string fk_mapdata, JsonData control, JsonData properties, string pks, string ctrlID)
        {
            FrmBtn btn = new FrmBtn(ctrlID);

            btn.MyPK       = ctrlID;
            btn.FK_MapData = fk_mapdata;

            //坐标
            JsonData style  = control["style"];
            JsonData vector = style["gradientBounds"];

            btn.X        = float.Parse(vector[0].ToJson());
            btn.Y        = float.Parse(vector[1].ToJson());
            btn.IsEnable = true;

            /*for (int iProperty = 0; iProperty < properties.Count; iProperty++)
             * {
             *  JsonData property = properties[iProperty];
             *  if (property == null || !property.Keys.Contains("property") || property["property"] == null)
             *      continue;
             *
             *  string val = null;
             *  if (property["PropertyValue"] != null)
             *      val = property["PropertyValue"].ToString();
             *
             *  string propertyBtn = property["property"].ToString();
             *  switch (propertyBtn)
             *  {
             *      case "primitives.1.str":
             *          btn.Text = val == null ? "" : val.Replace(" ", "&nbsp;").Replace("\n", "@");
             *          break;
             *      case "ButtonEvent":
             *          btn.EventType = val == null ? 0 : int.Parse(val);
             *          break;
             *      case "BtnEventDoc":
             *          btn.EventContext = val == null ? "" : val;
             *          break;
             *      default:
             *          break;
             *  }
             * }*/
            if (pks.Contains("@" + btn.MyPK + "@") == true)
            {
                btn.DirectUpdate();
            }
            else
            {
                btn.DirectInsert();
            }
        }