예제 #1
0
 /// <summary>
 /// 新建对象设置Key值
 /// </summary>
 /// <param name="newobj"></param>
 void gridViewOperation_CreatingObjectEvent(sd_tsqyzlsx newobj) {
     newobj.zldm = parentID;
 }
예제 #2
0
 private void createzlsx() {
     List<sd_tsqyzlsx> list = new List<sd_tsqyzlsx>();
     for (int i = 1; i <= 25; i++) {
         sd_tsqyzlsx sx = new sd_tsqyzlsx() {
              zldm=parentID, sxcol="a"+i,sxname="属性"+i, isdel="是",isedit="是",isuse="否"
              , norder=i, vtype="文本", ctype="文本"
         };
         sx.ID += i;
         list.Add(sx);
     }
     ClientHelper.PlatformSqlMap.ExecuteTransationUpdate(list.ToArray(), null, null);
 }
예제 #3
0
 private Control createControl(sd_tsqyzlsx sbsx) {
     Control c = createControl(sbsx.ctype);
     if (sbsx.ctype == "下拉列表") {
         DevExpress.XtraEditors.ComboBoxEdit box = c as DevExpress.XtraEditors.ComboBoxEdit;
         switch (sbsx.inittype) {
             case "查询":
                 
                 try {
                     IList list = ClientHelper.PlatformSqlMap.GetList("SelectOneStr", sbsx.initsql);
                     box.Properties.Items.AddRange(list);
                 } catch { }
                 break;
             default :
                 box.Properties.Items.AddRange(sbsx.initsql.Split('|'));
                 break;
         }
     }
     if (sbsx.ctype == "日期") {
         var cdate = c as DateEditEx;
         cdate.BindingData(rowData, sbsx.sxcol);
         //c.DataBindings.Add("EditValue", rowData, sbsx.sxcol, true, DataSourceUpdateMode.OnPropertyChanged, DBNull.Value, "yyyy-MM-dd");
     } else {
         c.DataBindings.Add("EditValue", rowData, sbsx.sxcol);
     }
     return c;
 }