Example #1
0
        private void btEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (gridView1.FocusedRowHandle < 0)
            {
                return;
            }
            PJ_ryda pj = gridView1.GetFocusedRow() as PJ_ryda;
            frmrsdaTemplate frm = new frmrsdaTemplate();
            frm.CurrRecord = pj;
            frm.RowData = pj;
            frm.Status = "edit";
            if (frm.ShowDialog() == DialogResult.OK)
            {

               
            }
            InitData();
        }
Example #2
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 #3
0
 private void repositoryItemHyperLinkEdit1_Click(object sender, EventArgs e)
 {
     int ihand = gridView1.FocusedRowHandle;
     if (ihand < 0)
         return;
     DataRow dr = gridView1.GetDataRow(ihand);
     PJ_ryda ry = MainHelper.PlatformSqlMap.GetOneByKey<PJ_ryda>(dr["ID"]);
     frmrsdaTemplate frm = new frmrsdaTemplate();
     frm.RowData  = ry;
     frm.strType = "";
     frm.Text ="安规电子档案"+"-"+ ry.wdmc;
     if (frm.ShowDialog() == DialogResult.OK)
     {
         
     }
 }