Example #1
0
 void gridViewOperation_AfterDelete(JH_monthks obj) {
     //恢复列表
     if (obj.计划种类.Contains("一")) {
        JH_yearks ks= Client.ClientHelper.PlatformSqlMap.GetOneByKey<JH_yearks>(obj.c2);
        if (ks != null) {
            ks.可选标记 = "";
            ClientHelper.PlatformSqlMap.Update<JH_yearks>(ks);
        }
     }
 }
Example #2
0
        void gridViewOperation_AfterAdd(JH_monthks obj) {
            

        }
Example #3
0
 /// <summary>
 /// 新建对象设置Key值
 /// </summary>
 /// <param name="newobj"></param>
 void gridViewOperation_CreatingObjectEvent(JH_monthks newobj) {
     newobj.ParentID = parentID;
     newobj.单位分类 = type1;
     if (org != null) {
         newobj.单位代码 = org.OrgCode;
         newobj.单位名称 = org.OrgName;
         newobj.c1 = org.OrgName;
     }
     newobj.计划种类 = "常规计划";
     newobj.计划分类 = type2;
     newobj.预计时间 = DateTime.Today;
     newobj.预计时间2 = DateTime.Today;
 }
Example #4
0
        void ks_RowDoubleClicked(object sender, JH_yearks obj) {
            if (parentID == null) {
                MsgBox.ShowAskMessageBox("请先选择计划月份");
                return;
            }
            foreach (JH_monthks jh in gridViewOperation.BindingList) {
                if (obj.ID == jh.c2) return;
            }
            JH_monthks addjh = new JH_monthks();
            //ConvertHelper.CopyTo(obj, addjh);

            Type t = addjh.GetType();
            Type t2 = obj.GetType();
            foreach (PropertyInfo p in t.GetProperties()) {
                
                    p.SetValue(addjh, t2.GetProperty(p.Name).GetValue(obj, null), null);
                
            }
            addjh.ID = addjh.CreateID();
            addjh.c2 = obj.ID;
            addjh.ParentID = parentID;
            addjh.完成标记 = "未完成";//xjq add
            addjh.完成时间 = DateTime.Now;
            Client.ClientHelper.PlatformSqlMap.Create<JH_monthks>(addjh);
            gridViewOperation.BindingList.Add(addjh);
            if (obj.计划种类.Contains("一")) {
                obj.可选标记 = "否";
                Client.ClientHelper.PlatformSqlMap.Update<JH_yearks>(obj);
            }
        }