Example #1
0
        private void btAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            PJ_ryda newobj = new PJ_ryda();
            if (parentID == null) return;
            newobj.OrgCode = parentObj.OrgCode;
            newobj.OrgName = parentObj.OrgName;
            if (parentID != null)
            {
                newobj.OrgCode = parentObj.OrgCode;
                newobj.OrgName = parentObj.OrgName;
            }
            newobj.CreateDate = DateTime.Now;
            Ebada.Core.UserBase m_UserBase = MainHelper.ValidateLogin();
            newobj.CreateMan = m_UserBase.RealName;
            frmrsdaTemplate frm = new frmrsdaTemplate();
            frm.CurrRecord = newobj;
            frm.RowData = newobj;
            frm.Status = "add";
            if (frm.ShowDialog() == DialogResult.OK)
            {

                if (isWorkflowCall)
                {
                    WF_ModleRecordWorkTaskIns mrwt = new WF_ModleRecordWorkTaskIns();
                    mrwt.ModleRecordID = newobj.ID;
                    mrwt.RecordID = currRecord.ID;
                    mrwt.WorkFlowId = WorkFlowData.Rows[0]["WorkFlowId"].ToString();
                    mrwt.WorkFlowInsId = WorkFlowData.Rows[0]["WorkFlowInsId"].ToString();
                    mrwt.WorkTaskId = WorkFlowData.Rows[0]["WorkTaskId"].ToString();
                    mrwt.ModleTableName = newobj.GetType().ToString();
                    mrwt.WorkTaskInsId = WorkFlowData.Rows[0]["WorkTaskInsId"].ToString();
                    mrwt.CreatTime = DateTime.Now;
                    MainHelper.PlatformSqlMap.Create<WF_ModleRecordWorkTaskIns>(mrwt);
                    MainHelper.PlatformSqlMap.Update<LP_Record>(currRecord);
                }
            }
            InitData();
        }
Example #2
0
 void gridViewOperation_AfterAdd(PJ_ryda newobj)
 {
     if (isWorkflowCall)
     {
         WF_ModleRecordWorkTaskIns mrwt = new WF_ModleRecordWorkTaskIns();
         mrwt.ModleRecordID = newobj.ID;
         mrwt.RecordID = currRecord.ID;
         mrwt.WorkFlowId = WorkFlowData.Rows[0]["WorkFlowId"].ToString();
         mrwt.WorkFlowInsId = WorkFlowData.Rows[0]["WorkFlowInsId"].ToString();
         mrwt.WorkTaskId = WorkFlowData.Rows[0]["WorkTaskId"].ToString();
         mrwt.ModleTableName = newobj.GetType().ToString();
         mrwt.WorkTaskInsId = WorkFlowData.Rows[0]["WorkTaskInsId"].ToString();
         mrwt.CreatTime = DateTime.Now;
         MainHelper.PlatformSqlMap.Create<WF_ModleRecordWorkTaskIns>(mrwt);
         currRecord.DocContent = newobj.BigData;
         MainHelper.PlatformSqlMap.Update<LP_Record>(currRecord);
     }
 }