Beispiel #1
0
 private void barFJLY_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (fjly == null) fjly = new frmModleFjly();
     fjly.CurrRecord = currRecord;
     fjly.RecordWorkFlowData = WorkFlowData;
     fjly.Kind = currRecord.Kind;
     fjly.Status = RecordWorkTask.GetWorkTaskStatus(WorkFlowData, currRecord);
     fjly.ShowDialog();
 }
Beispiel #2
0
        private void TaskOverButton_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {

            //请求确认
            if (MsgBox.ShowAskMessageBox("是否确认此节点结束,并进入下一流程?") != DialogResult.OK)
            {
                //SendMessage(this.Handle, 0x0010, (IntPtr)0, (IntPtr)0);
                return;
            }
            string strmes = "";

            if (RecordWorkTask.CheckOnRiZhi(WorkFlowData))
            {

                RecordWorkTask.CreatRiZhi(WorkFlowData, null, currRecord.ID, new object[] { currRecord });

            }
            WF_WorkTaskCommands wt = (WF_WorkTaskCommands)MainHelper.PlatformSqlMap.GetObject("SelectWF_WorkTaskCommandsList", " where WorkFlowId='" + WorkFlowData.Rows[0]["WorkFlowId"].ToString() + "' and WorkTaskId='" + WorkFlowData.Rows[0]["WorkTaskId"].ToString() + "'");
            if (wt != null)
            {
                strmes = RecordWorkTask.RunWorkFlow(MainHelper.User.UserID, WorkFlowData.Rows[0]["OperatorInsId"].ToString(), WorkFlowData.Rows[0]["WorkTaskInsId"].ToString(), wt.CommandName);
            }
            else
            {
                strmes = RecordWorkTask.RunWorkFlow(MainHelper.User.UserID, WorkFlowData.Rows[0]["OperatorInsId"].ToString(), WorkFlowData.Rows[0]["WorkTaskInsId"].ToString(), "提交");
            }
            if (strmes.IndexOf("未提交至任何人") > -1)
            {
                MsgBox.ShowTipMessageBox("未提交至任何人,创建失败,请检查流程模板和组织机构配置是否正确!");
                return;
            }
            else
                MsgBox.ShowTipMessageBox(strmes);
            if (fjly == null) fjly = new frmModleFjly();
            fjly.btn_Submit_Click(sender, e);
            strmes = RecordWorkTask.GetWorkFlowTaskCaption(WorkFlowData.Rows[0]["WorkTaskInsId"].ToString());
            if (strmes == "结束节点1")
            {
                currRecord.Status = "存档";
            }
            else
            {
                currRecord.Status = strmes;
            }
            currRecord.LastChangeTime = DateTime.Now.ToString();
            if (currRecord.ImageAttachment == null) currRecord.ImageAttachment = new byte[0];
            if (currRecord.SignImg == null) currRecord.SignImg = new byte[0];
            MainHelper.PlatformSqlMap.Update("UpdateLP_Record", CurrRecord);
            gridControl1.FindForm().Close();
        }
Beispiel #3
0
 public UCSCTZ()
 {
     InitializeComponent();
     initImageList();
     gridViewOperation = new GridViewOperation<PJ_clcrkd>(gridControl1, gridView1, barManager1, new frmSCTZEdit());
     gridViewOperation.BeforeAdd += new ObjectOperationEventHandler<PJ_clcrkd>(gridViewOperation_BeforeAdd);
     gridViewOperation.CreatingObjectEvent += gridViewOperation_CreatingObjectEvent;
     gridViewOperation.AfterAdd += new ObjectEventHandler<PJ_clcrkd>(gridViewOperation_AfterAdd);
     gridViewOperation.AfterDelete += new ObjectEventHandler<PJ_clcrkd>(gridViewOperation_AfterDelete);
     gridViewOperation.BeforeDelete += new ObjectOperationEventHandler<PJ_clcrkd>(gridViewOperation_BeforeDelete);
     gridView1.FocusedRowChanged += gridView1_FocusedRowChanged;
     if (isWorkflowCall && fjly==null)
     {
         fjly = new frmModleFjly();
     }
 }
Beispiel #4
0
        private void SubmitButton_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frmModleSubmit fm = new frmModleSubmit();
            fm.RecordWorkFlowData = WorkFlowData;
            fm.CurrRecord = currRecord;
            if (currRecord.Status == "申报")
                fm.Status = "add";
            else
                fm.Status = "edit";
            fm.Kind = currRecord.Kind;
            frmProjectSelect fys = new frmProjectSelect();
            fys.strType = " and (type = '工程材料出库单' ) ";
            fys.StrSQL = "select distinct ssgc  from PJ_clcrkd where  (type = '工程材料出库单' ) ";
            if (fys.ShowDialog() == DialogResult.OK)
            {
                ExportCLCKEdit export = new ExportCLCKEdit();
                export.CurrRecord = currRecord;
                export.IsWorkflowCall = isWorkflowCall;
                export.ParentTemple = parentTemple;
                export.RecordWorkFlowData = WorkFlowData;

                export.ExportExcelSubmit(ref parentTemple, "", fys.strProject, fys.strFenproject, false);

                fm.ParentTemple = parentTemple;
                if (fm.ShowDialog() == DialogResult.OK)
                {
                    if (fjly == null) fjly = new frmModleFjly();
                    fjly.btn_Submit_Click(sender, e);
                    if (MainHelper.UserOrg.OrgName.IndexOf("局") == -1)
                        export.ExportExceljhbAllSubmitToWF_ModleRecordWorkTaskIns("", fys.strProject, fys.strFenproject);
                    else
                        export.ExportExceljhbAllSubmitToWF_ModleRecordWorkTaskIns("", fys.strProject, fys.strFenproject);
                    gridControl1.FindForm().Close();
                }
            }
        }
Beispiel #5
0
        private void SubmitButton_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frmModleSubmit fm = new frmModleSubmit();
            fm.RecordWorkFlowData = WorkFlowData;
            fm.CurrRecord = currRecord;
            if (currRecord.Status == "申报")
                fm.Status = "add";
            else
                fm.Status = "edit";
            fm.Kind = currRecord.Kind;


            ExportSBBZQSBGMXB2Edit export = new ExportSBBZQSBGMXB2Edit();
                export.CurrRecord = currRecord;
                export.IsWorkflowCall = isWorkflowCall;
                export.ParentTemple = parentTemple;
                export.RecordWorkFlowData = WorkFlowData;

                export.ExportExcelSubmit(ref parentTemple, parentID,  false);

                fm.ParentTemple = parentTemple;
                if (fm.ShowDialog() == DialogResult.OK)
                {
                    if (fjly == null) fjly = new frmModleFjly();
                    fjly.btn_Submit_Click(sender, e);
                    if (MainHelper.UserOrg.OrgName.IndexOf("局") == -1)
                        export.ExportExceljhbAllSubmitToWF_ModleRecordWorkTaskIns(parentID);
                    else
                        export.ExportExceljhbAllSubmitToWF_ModleRecordWorkTaskIns(parentID);
                    gridControl1.FindForm().Close();
                }
            
        }
Beispiel #6
0
 public UCGDSRK()
 {
     InitializeComponent();
     initImageList();
     gridViewOperation = new GridViewOperation<PJ_gdscrk>(gridControl1, gridView1, barManager1, frm);
     gridViewOperation.BeforeAdd += new ObjectOperationEventHandler<PJ_gdscrk>(gridViewOperation_BeforeAdd);
     gridViewOperation.CreatingObjectEvent += gridViewOperation_CreatingObjectEvent;
     gridViewOperation.AfterAdd += new ObjectEventHandler<PJ_gdscrk>(gridViewOperation_AfterAdd);
     gridViewOperation.AfterDelete += new ObjectEventHandler<PJ_gdscrk>(gridViewOperation_AfterDelete);
     gridViewOperation.BeforeDelete += new ObjectOperationEventHandler<PJ_gdscrk>(gridViewOperation_BeforeDelete);
     gridViewOperation.BeforeDelete += new ObjectOperationEventHandler<PJ_gdscrk>(gridViewOperation_BeforeDelete);
     if (isWorkflowCall && fjly == null)
     {
         fjly = new frmModleFjly();
     }
 }
        private void barxqjh_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            //请求确认
            if (MsgBox.ShowAskMessageBox("是否确认此节点结束,生成消缺计划并进入下一流程?") != DialogResult.OK)
            {
                //SendMessage(this.Handle, 0x0010, (IntPtr)0, (IntPtr)0);
                return;
            }
            string slqwhere = "where OrgCode='" + parentID + "' ";
            slqwhere = slqwhere + " and id not in (select ModleRecordID from WF_ModleRecordWorkTaskIns where RecordID='" + CurrRecord.ID + "'";
            slqwhere = slqwhere + " and  WorkFlowId='" + WorkFlowData.Rows[0]["WorkFlowId"].ToString() + "'"
                   + " and  WorkFlowInsId='" + WorkFlowData.Rows[0]["WorkFlowInsId"].ToString() + "'"
                   + " and  WorkTaskId='" + WorkFlowData.Rows[0]["WorkTaskId"].ToString() + "'"
                   + " and  WorkTaskInsId='" + WorkFlowData.Rows[0]["WorkTaskInsId"].ToString() + "')"
             + " and DATEDIFF(day,cast('1900-1-1'  as datetime ) ,cast(xcrq  as datetime) )<1 ";
            slqwhere += " order by id desc";
            dalist = MainHelper.PlatformSqlMap.GetListByWhere<PJ_06sbxs>(slqwhere);
            string strmes = "";

            if (RecordWorkTask.CheckOnRiZhi(WorkFlowData))
            {

                RecordWorkTask.CreatRiZhi(WorkFlowData, null, currRecord.ID, new object[] { currRecord });

            }

            WF_WorkTaskCommands wt = (WF_WorkTaskCommands)MainHelper.PlatformSqlMap.GetObject("SelectWF_WorkTaskCommandsList", " where WorkFlowId='" + WorkFlowData.Rows[0]["WorkFlowId"].ToString() + "' and WorkTaskId='" + WorkFlowData.Rows[0]["WorkTaskId"].ToString() + "'");
            if (wt != null)
            {
                strmes = RecordWorkTask.RunWorkFlow(MainHelper.User.UserID, WorkFlowData.Rows[0]["OperatorInsId"].ToString(), WorkFlowData.Rows[0]["WorkTaskInsId"].ToString(), wt.CommandName);
            }
            else
            {
                strmes = RecordWorkTask.RunWorkFlow(MainHelper.User.UserID, WorkFlowData.Rows[0]["OperatorInsId"].ToString(), WorkFlowData.Rows[0]["WorkTaskInsId"].ToString(), "提交");
            }
            if (strmes.IndexOf("未提交至任何人") > -1)
            {
                MsgBox.ShowTipMessageBox("未提交至任何人,创建失败,请检查流程模板和组织机构配置是否正确!");
                return;
            }
            else
                MsgBox.ShowTipMessageBox(strmes);
            if (fjly == null) fjly = new frmModleFjly();
            fjly.btn_Submit_Click(sender, e);
            strmes = RecordWorkTask.GetWorkFlowTaskCaption(WorkFlowData.Rows[0]["WorkTaskInsId"].ToString());
            if (strmes == "结束节点1")
            {
                currRecord.Status = "存档";
            }
            else
            {
                currRecord.Status = strmes;
            }
            currRecord.LastChangeTime = DateTime.Now.ToString();
            if (currRecord.ImageAttachment == null) currRecord.ImageAttachment = new byte[0];
            if (currRecord.SignImg == null) currRecord.SignImg = new byte[0];
            MainHelper.PlatformSqlMap.Update("UpdateLP_Record", CurrRecord);

            DataTable dt = RecordWorkTask.GetRecordWorkFlowData(currRecord.ID, MainHelper.User.UserID);
            slqwhere = "where OrgCode='" + parentID + "' ";
            slqwhere = slqwhere + " and (id not in (select ModleRecordID from WF_ModleRecordWorkTaskIns where 1=1 ";
            slqwhere = slqwhere + " and  WorkFlowId='" + WorkFlowData.Rows[0]["WorkFlowId"].ToString() + "'"

               + " and  WorkTaskId='" + WorkFlowData.Rows[0]["WorkTaskId"].ToString() + "') "
               + " or (id  in (select ModleRecordID from WF_ModleRecordWorkTaskIns where 1=1 ";
            slqwhere = slqwhere + " and  RecordID='" + currRecord.ID + "'"
              + " and  WorkFlowInsId='" + WorkFlowData.Rows[0]["WorkFlowInsId"].ToString() + "' "
              + " and  WorkTaskInsId='" + WorkFlowData.Rows[0]["WorkTaskInsId"].ToString() + "' "
               + " and  WorkTaskId='" + WorkFlowData.Rows[0]["WorkTaskId"].ToString() + "')) "
              + ")"
              ;

            slqwhere += " order by id desc";
            dalist = MainHelper.PlatformSqlMap.GetListByWhere<PJ_06sbxs>(slqwhere);
            foreach (PJ_06sbxs sbxs in dalist)
            {
                if (sbxs.qxlb == "") continue;
                WF_ModleRecordWorkTaskIns mrwt = new WF_ModleRecordWorkTaskIns();
                PJ_qxfl qxfj = new PJ_qxfl();
                if (WorkFlowData.Rows[0]["flowcaption"].ToString() == "春查消缺外查")
                {
                    PJ_ccxqjh ccxqjh = new PJ_ccxqjh();
                    ccxqjh.ID = sbxs.ID;
                    ccxqjh.OrgCode = sbxs.OrgCode;
                    ccxqjh.OrgName = sbxs.OrgName;
                    ccxqjh.qxlb = sbxs.qxlb;
                    ccxqjh.xqlr = sbxs.qxnr;
                    Thread.Sleep(new TimeSpan(100000));//0.1毫秒
                    try
                    {
                        MainHelper.PlatformSqlMap.Create<PJ_ccxqjh>(ccxqjh);
                    }
                    catch { }
                    qxfj.ID = ccxqjh.ID;

                    mrwt.ID = mrwt.CreateID();
                    mrwt.ModleRecordID = ccxqjh.ID;
                    mrwt.RecordID = currRecord.ID;
                    mrwt.WorkFlowId = dt.Rows[0]["WorkFlowId"].ToString();
                    mrwt.WorkFlowInsId = dt.Rows[0]["WorkFlowInsId"].ToString();
                    mrwt.WorkTaskId = dt.Rows[0]["WorkTaskId"].ToString();
                    mrwt.ModleTableName = ccxqjh.GetType().ToString();
                    mrwt.WorkTaskInsId = dt.Rows[0]["WorkTaskInsId"].ToString();
                    mrwt.CreatTime = DateTime.Now;
                    Thread.Sleep(new TimeSpan(100000));//0.1毫秒

                }
                else
                    if (WorkFlowData.Rows[0]["flowcaption"].ToString() == "秋查消缺外查")
                    {

                        PJ_qcxqjh qcxqjh = new PJ_qcxqjh();
                        qcxqjh.ID = sbxs.ID;
                        qcxqjh.OrgCode = sbxs.OrgCode;
                        qcxqjh.OrgName = sbxs.OrgName;
                        qcxqjh.qxlb = sbxs.qxlb;
                        qcxqjh.xqlr = sbxs.qxnr;
                        Thread.Sleep(new TimeSpan(100000));//0.1毫秒
                        try
                        {
                            MainHelper.PlatformSqlMap.Create<PJ_qcxqjh>(qcxqjh);
                        }
                        catch { }
                        qxfj.ID = qcxqjh.ID;


                        mrwt.ID = mrwt.CreateID();
                        mrwt.ModleRecordID = qcxqjh.ID;
                        mrwt.RecordID = currRecord.ID;
                        mrwt.WorkFlowId = dt.Rows[0]["WorkFlowId"].ToString();
                        mrwt.WorkFlowInsId = dt.Rows[0]["WorkFlowInsId"].ToString();
                        mrwt.WorkTaskId = dt.Rows[0]["WorkTaskId"].ToString();
                        mrwt.ModleTableName = qcxqjh.GetType().ToString();
                        mrwt.WorkTaskInsId = dt.Rows[0]["WorkTaskInsId"].ToString();
                        mrwt.CreatTime = DateTime.Now;
                        Thread.Sleep(new TimeSpan(100000));//0.1毫秒
                    }

                qxfj.CreateDate = sbxs.CreateDate;
                qxfj.CreateMan = sbxs.CreateMan;
                qxfj.LineID = sbxs.LineID;
                qxfj.LineName = sbxs.LineName;
                qxfj.OrgCode = sbxs.OrgCode;
                qxfj.OrgName = sbxs.OrgName;
                qxfj.qxlb = sbxs.qxlb;
                qxfj.qxly = "设备巡视";
                qxfj.qxnr = sbxs.qxnr;
                qxfj.xcqx = sbxs.xcqx;
                qxfj.xcr = sbxs.xcr;
                qxfj.xlqd = sbxs.xlqd;
                qxfj.xsr = sbxs.xsr;
                qxfj.xssj = sbxs.xssj;
                try
                {
                    MainHelper.PlatformSqlMap.Create<PJ_qxfl>(qxfj);
                }
                catch { }



                MainHelper.PlatformSqlMap.Create<WF_ModleRecordWorkTaskIns>(mrwt);
                //Thread.Sleep(new TimeSpan(100000));//0.1毫秒
                //mrwt = new WF_ModleRecordWorkTaskIns();
                //mrwt.ID = mrwt.CreateID();
                //mrwt.ModleRecordID = qxfj.ID;
                //mrwt.RecordID = currRecord.ID;
                //mrwt.WorkFlowId = dt.Rows[0]["WorkFlowId"].ToString();
                //mrwt.WorkFlowInsId = dt.Rows[0]["WorkFlowInsId"].ToString();
                //mrwt.WorkTaskId = dt.Rows[0]["WorkTaskId"].ToString();
                //mrwt.ModleTableName = qxfj.GetType().ToString();
                //mrwt.WorkTaskInsId = dt.Rows[0]["WorkTaskInsId"].ToString();
                //mrwt.CreatTime = DateTime.Now;
                //Thread.Sleep(new TimeSpan(100000));//0.1毫秒
                //MainHelper.PlatformSqlMap.Create<WF_ModleRecordWorkTaskIns>(mrwt);

                mrwt = new WF_ModleRecordWorkTaskIns();
                mrwt.ID = mrwt.CreateID();
                mrwt.ModleRecordID = sbxs.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 = sbxs.GetType().ToString();
                mrwt.WorkTaskInsId = WorkFlowData.Rows[0]["WorkTaskInsId"].ToString();
                mrwt.CreatTime = DateTime.Now;
                Thread.Sleep(new TimeSpan(100000));//0.1毫秒
                MainHelper.PlatformSqlMap.Create<WF_ModleRecordWorkTaskIns>(mrwt);
            }
            gridControl1.FindForm().Close();
        }