コード例 #1
0
ファイル: UCPJ_dlxxt.cs プロジェクト: s7loves/mypowerscgl
        private void btReEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {

            if (gridView1.FocusedRowHandle < 0) return;
            DataRow dr = gridView1.GetDataRow(gridView1.FocusedRowHandle);
            PJ_gypdxldxxtt currRecord = new PJ_gypdxldxxtt();
            foreach (DataColumn dc in gridtable.Columns)
            {
                if (dc.ColumnName != "Image")
                {
                    if (dc.DataType.FullName.IndexOf("Byte[]") < 0)
                        currRecord.GetType().GetProperty(dc.ColumnName).SetValue(currRecord, dr[dc.ColumnName], null);
                    else if (dc.DataType.FullName.IndexOf("Byte[]") > -1 && DBNull.Value != dr[dc.ColumnName] && dr[dc.ColumnName].ToString() != "")
                        currRecord.GetType().GetProperty(dc.ColumnName).SetValue(currRecord, dr[dc.ColumnName], null);

                }
            }
            frmdlxxtEdit frm = new frmdlxxtEdit();
            frm.RowData = currRecord;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                MainHelper.PlatformSqlMap.Update<PJ_gypdxldxxtt>(currRecord);
                InitData();
            }
        }
コード例 #2
0
ファイル: UCPJ_dlxxt.cs プロジェクト: s7loves/mypowerscgl
 /// <summary>
 /// 新建对象设置Key值
 /// </summary>
 /// <param name="newobj"></param>
 void gridViewOperation_CreatingObjectEvent(PJ_gypdxldxxtt newobj)
 {
    if (parentID == null) return;
     newobj.OrgCode = parentID;
     newobj.OrgName = parentObj.OrgName;
     newobj.CreateDate = DateTime.Now;
     Ebada.Core.UserBase m_UserBase = MainHelper.ValidateLogin();
     newobj.CreateMan = m_UserBase.RealName;
     try { frmLP.ReadTaskData(newobj, RecordWorkFlowData, ParentTemple, CurrRecord); } catch { }
 }
コード例 #3
0
ファイル: UCPJ_dlxxt.cs プロジェクト: s7loves/mypowerscgl
 private void btReAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (parentID == null) return;
     PJ_gypdxldxxtt newobj = new PJ_gypdxldxxtt();
     newobj.CreateDate = DateTime.Now;
     newobj.OrgCode = parentID;
     newobj.OrgName = parentObj.OrgName;
     Ebada.Core.UserBase m_UserBase = MainHelper.ValidateLogin();
     newobj.CreateMan = m_UserBase.RealName;
     frmdlxxtEdit frm = new frmdlxxtEdit();
     frm.RowData = newobj;
     if (frm.ShowDialog() == DialogResult.OK)
     {
         MainHelper.PlatformSqlMap.Create<PJ_gypdxldxxtt>(newobj);
         InitData();
     }
 }
コード例 #4
0
ファイル: UCPJ_dlxxt.cs プロジェクト: s7loves/mypowerscgl
 void gridViewOperation_AfterAdd(PJ_gypdxldxxtt 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);
     }
 }