bool frm_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            FM_InstitutionProcess lnqProcess = (FM_InstitutionProcess)form.ResultInfo;

            if (!CheckData(lnqProcess))
            {
                return(false);
            }

            MessageDialog.ShowPromptMessage("请选择相关部门");

            FormDataTableCheck frmCheck = new FormDataTableCheck(UniversalFunction.GetAllDeptInfo());

            if (frmCheck.ShowDialog() == DialogResult.OK)
            {
                List <string> list = DataSetHelper.ColumnsToList_Distinct(frmCheck._DtResult, "部门代码");

                if (!m_serverInstitution.AddInfo(lnqProcess, list, out m_strErr))
                {
                    MessageDialog.ShowPromptMessage(m_strErr);
                    return(false);
                }
            }
            else
            {
                MessageDialog.ShowPromptMessage("请选择相关部门");
                return(false);
            }

            return(true);
        }
        private bool 判定报告_Form_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            IJudgeReport m_serviceJudgeReport = Service_Quality_QC.ServerModuleFactory.GetServerModule <IJudgeReport>();

            try
            {
                Business_InspectionJudge_JudgeReport lnqJudgeReport =
                    form.ResultList[0] as Business_InspectionJudge_JudgeReport;

                this.OperationType =
                    GeneralFunction.StringConvertToEnum <CE_FlowOperationType>(form.ResultList[1].ToString());

                List <View_Business_InspectionJudge_JudgeReportDetail> detailInfo =
                    form.ResultList[2] as List <View_Business_InspectionJudge_JudgeReportDetail>;

                List <View_Business_InspectionJudge_JudgeReport_Item> itemInfo =
                    form.ResultList[3] as List <View_Business_InspectionJudge_JudgeReport_Item>;

                this.BillNo = lnqJudgeReport.BillNo;

                switch (this.OperationType)
                {
                case CE_FlowOperationType.提交:
                    m_serviceJudgeReport.SaveInfo(lnqJudgeReport, itemInfo, detailInfo);
                    break;

                case CE_FlowOperationType.暂存:
                    m_serviceJudgeReport.SaveInfo(lnqJudgeReport, itemInfo, detailInfo);
                    break;

                case CE_FlowOperationType.回退:
                    break;

                case CE_FlowOperationType.未知:
                    break;

                default:
                    break;
                }

                if (!m_serviceJudgeReport.IsExist(lnqJudgeReport.BillNo))
                {
                    MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面");
                    return(false);
                }

                return(true);
            }
            catch (Exception ex)
            {
                MessageDialog.ShowPromptMessage(ex.Message);
                return(false);
            }
        }
        bool frm_CommonProcessSubmit1(CustomFlowForm form, string advise)
        {
            FM_InstitutionProcess lnqProcess = (FM_InstitutionProcess)form.ResultInfo;

            if (!m_serverInstitution.UpdateInfo(lnqProcess.BillNo, advise, out m_strErr))
            {
                MessageDialog.ShowPromptMessage(m_strErr);
                return(false);
            }

            return(true);
        }
        bool frm_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            try
            {
                List <View_Business_PurchasingMG_PartsBelongPriovderChangeDetail> detailInfo =
                    form.ResultInfo as List <View_Business_PurchasingMG_PartsBelongPriovderChangeDetail>;
                Business_PurchasingMG_PartsBelongPriovderChange lnqInPut = form.ResultList[0] as Business_PurchasingMG_PartsBelongPriovderChange;

                this.OperationType = GeneralFunction.StringConvertToEnum <CE_FlowOperationType>(form.ResultList[1].ToString());
                this.BillNo        = lnqInPut.BillNo;

                switch (this.OperationType)
                {
                case CE_FlowOperationType.提交:
                    //if (!panel.GetNotifyPersonnel())
                    //{
                    //    return false;
                    //}

                    //NotifyPersonnel = panel.FlowInfo_NotifyInfo;
                    m_serviceChangeBill.SaveInfo(lnqInPut, detailInfo);
                    m_serviceChangeBill.FinishBill(lnqInPut.BillNo);
                    break;

                case CE_FlowOperationType.暂存:
                    m_serviceChangeBill.SaveInfo(lnqInPut, detailInfo);
                    break;

                case CE_FlowOperationType.回退:
                    break;

                case CE_FlowOperationType.未知:
                    break;

                default:
                    break;
                }

                if (!m_serviceChangeBill.IsExist(lnqInPut.BillNo))
                {
                    MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面");
                    return(false);
                }

                return(true);
            }
            catch (Exception ex)
            {
                MessageDialog.ShowPromptMessage(ex.Message);
                return(false);
            }
        }
Esempio n. 5
0
        bool frm_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            try
            {
                Business_Base_BomChange lnqBillInfo = form.ResultInfo as Business_Base_BomChange;

                List <View_Business_Base_BomChange_Struct> structInfo =
                    form.ResultList[0] as List <View_Business_Base_BomChange_Struct>;
                List <View_Business_Base_BomChange_PartsLibrary> libraryInfo =
                    form.ResultList[1] as List <View_Business_Base_BomChange_PartsLibrary>;

                this.OperationType = form.FlowOperationType;
                this.BillNo        = lnqBillInfo.BillNo;

                switch (this.OperationType)
                {
                case CE_FlowOperationType.提交:
                    this.NotifyPersonnel = form.FlowInfo_NotifyInfo;
                    m_serviceStatement.SaveInfo(lnqBillInfo, libraryInfo, structInfo);
                    m_serviceStatement.OperatarUnFlowBusiness(lnqBillInfo.BillNo);
                    break;

                case CE_FlowOperationType.暂存:
                    m_serviceStatement.SaveInfo(lnqBillInfo, libraryInfo, structInfo);
                    break;

                case CE_FlowOperationType.回退:
                    break;

                case CE_FlowOperationType.未知:
                    break;

                default:
                    break;
                }

                if (!m_serviceStatement.IsExist(lnqBillInfo.BillNo))
                {
                    MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面");
                    return(false);
                }

                return(true);
            }
            catch (Exception ex)
            {
                MessageDialog.ShowPromptMessage(ex.Message);
                return(false);
            }
        }
Esempio n. 6
0
        bool 采购结算单_Form_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            try
            {
                Business_Settlement_ProcurementStatement lnqBillInfo =
                    form.ResultInfo as Business_Settlement_ProcurementStatement;

                List <Business_Settlement_ProcurementStatement_Invoice> invoiceInfo =
                    form.ResultList[0] as List <Business_Settlement_ProcurementStatement_Invoice>;
                List <View_Business_Settlement_ProcurementStatementDetail> detailInfo =
                    form.ResultList[1] as List <View_Business_Settlement_ProcurementStatementDetail>;

                this.OperationType = GeneralFunction.StringConvertToEnum <CE_FlowOperationType>(form.ResultList[2].ToString());
                this.BillNo        = lnqBillInfo.BillNo;

                switch (this.OperationType)
                {
                case CE_FlowOperationType.提交:
                    m_serviceStatement.SaveInfo(lnqBillInfo, invoiceInfo, detailInfo);
                    m_serviceStatement.OperatarUnFlowBusiness(lnqBillInfo.BillNo);
                    break;

                case CE_FlowOperationType.暂存:
                    m_serviceStatement.SaveInfo(lnqBillInfo, invoiceInfo, detailInfo);
                    break;

                case CE_FlowOperationType.回退:
                    break;

                case CE_FlowOperationType.未知:
                    break;

                default:
                    break;
                }

                if (!m_serviceStatement.IsExist(lnqBillInfo.BillNo))
                {
                    MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面");
                    return(false);
                }

                return(true);
            }
            catch (Exception ex)
            {
                MessageDialog.ShowPromptMessage(ex.Message);
                return(false);
            }
        }
Esempio n. 7
0
        private bool 培训计划申请表_Form_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            IBatchNoChange servcieChange = Service_Manufacture_WorkShop.ServerModuleFactory.GetServerModule <IBatchNoChange>();

            try
            {
                this.OperationType = form.FlowOperationType;
                this.BillNo        = form.FlowInfo_BillNo;

                Business_WorkShop_BatchNoChange changeInfo = form.ResultInfo as Business_WorkShop_BatchNoChange;

                List <View_Business_WorkShop_BatchNoChangeDetail> lstDetail =
                    form.ResultList[0] as List <View_Business_WorkShop_BatchNoChangeDetail>;

                switch (this.OperationType)
                {
                case CE_FlowOperationType.提交:
                    servcieChange.SaveInfo(changeInfo, lstDetail);
                    servcieChange.OperationBusiness(this.BillNo);
                    break;

                case CE_FlowOperationType.暂存:
                    servcieChange.SaveInfo(changeInfo, lstDetail);
                    break;

                case CE_FlowOperationType.回退:
                    break;

                case CE_FlowOperationType.未知:
                    break;

                default:
                    break;
                }

                if (!servcieChange.IsExist(this.BillNo))
                {
                    MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面");
                    return(false);
                }

                return(true);
            }
            catch (Exception ex)
            {
                MessageDialog.ShowPromptMessage(ex.Message);
                return(false);
            }
        }
Esempio n. 8
0
        private bool 重点工作_Form_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            try
            {
                Bus_FocalWork_MonthlyProgress lnqBillInfo = form.ResultInfo as Bus_FocalWork_MonthlyProgress;
                this.OperationType = GeneralFunction.StringConvertToEnum <CE_FlowOperationType>(form.ResultList[0].ToString());

                List <Bus_FocalWork_MonthlyProgress_Content> lstContent =
                    form.ResultList[1] as List <Bus_FocalWork_MonthlyProgress_Content>;
                List <Bus_FocalWork_MonthlyProgress_KeyPoint> lstKeyPoint =
                    form.ResultList[2] as List <Bus_FocalWork_MonthlyProgress_KeyPoint>;

                this.BillNo = lnqBillInfo.BillNo;

                switch (this.OperationType)
                {
                case CE_FlowOperationType.提交:
                    _Service_FocalWork.SaveInfo(lnqBillInfo, lstContent, lstKeyPoint);
                    _Service_FocalWork.OpertionInfo(lnqBillInfo.BillNo);
                    break;

                case CE_FlowOperationType.暂存:
                    _Service_FocalWork.SaveInfo(lnqBillInfo, lstContent, lstKeyPoint);
                    break;

                case CE_FlowOperationType.回退:
                    break;

                case CE_FlowOperationType.未知:
                    break;

                default:
                    break;
                }

                if (!_Service_FocalWork.IsExist(lnqBillInfo.BillNo))
                {
                    MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面");
                    return(false);
                }

                return(true);
            }
            catch (Exception ex)
            {
                MessageDialog.ShowPromptMessage(ex.Message);
                return(false);
            }
        }
Esempio n. 9
0
        private bool 培训计划申请表_Form_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            ITrainSurvey servcieSurvey = Service_Peripheral_HR.ServerModuleFactory.GetServerModule <ITrainSurvey>();

            try
            {
                this.OperationType = form.FlowOperationType;
                this.BillNo        = form.FlowInfo_BillNo;

                HR_Train_Plan planInfo = form.ResultInfo as HR_Train_Plan;

                List <View_HR_Train_PlanCourse> lstCourseInfo = form.ResultList[0] as List <View_HR_Train_PlanCourse>;
                List <View_HR_Train_PlanUser>   lstUser       = form.ResultList[1] as List <View_HR_Train_PlanUser>;

                switch (this.OperationType)
                {
                case CE_FlowOperationType.提交:
                    servcieSurvey.SaveInfo(planInfo, lstCourseInfo, lstUser);
                    servcieSurvey.OperationBusiness(this.BillNo);
                    break;

                case CE_FlowOperationType.暂存:
                    servcieSurvey.SaveInfo(planInfo, lstCourseInfo, lstUser);
                    break;

                case CE_FlowOperationType.回退:
                    break;

                case CE_FlowOperationType.未知:
                    break;

                default:
                    break;
                }

                if (!servcieSurvey.IsExist(this.BillNo))
                {
                    MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面");
                    return(false);
                }

                return(true);
            }
            catch (Exception ex)
            {
                MessageDialog.ShowPromptMessage(ex.Message);
                return(false);
            }
        }
Esempio n. 10
0
        private bool 入库单_Form_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            IInPutService serviceInPut = Service_Manufacture_Storage.ServerModuleFactory.GetServerModule <IInPutService>();

            try
            {
                List <View_Business_WarehouseInPut_InPutDetail> detailInfo =
                    form.ResultInfo as List <View_Business_WarehouseInPut_InPutDetail>;
                Business_WarehouseInPut_InPut lnqInPut = form.ResultList[0] as Business_WarehouseInPut_InPut;

                this.OperationType = GeneralFunction.StringConvertToEnum <CE_FlowOperationType>(form.ResultList[1].ToString());
                this.BillNo        = lnqInPut.BillNo;

                switch (this.OperationType)
                {
                case CE_FlowOperationType.提交:
                    serviceInPut.SaveInfo(lnqInPut, detailInfo);
                    serviceInPut.FinishBill(lnqInPut.BillNo);
                    break;

                case CE_FlowOperationType.暂存:
                    serviceInPut.SaveInfo(lnqInPut, detailInfo);
                    break;

                case CE_FlowOperationType.回退:
                    break;

                case CE_FlowOperationType.未知:
                    break;

                default:
                    break;
                }

                if (!serviceInPut.IsExist(lnqInPut.BillNo))
                {
                    MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面");
                    return(false);
                }

                return(true);
            }
            catch (Exception ex)
            {
                MessageDialog.ShowPromptMessage(ex.Message);
                return(false);
            }
        }
        private bool 年度预算申请表_Form_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            IBudgetYear servcieYear = Service_Economic_Financial.ServerModuleFactory.GetServerModule <IBudgetYear>();

            try
            {
                this.OperationType = form.FlowOperationType;
                this.BillNo        = form.FlowInfo_BillNo;
                Business_Finance_Budget_Year yearInfo = form.ResultInfo as Business_Finance_Budget_Year;

                DataTable detailTable = form.ResultList[0] as DataTable;

                switch (this.OperationType)
                {
                case CE_FlowOperationType.提交:
                    servcieYear.SaveInfo(detailTable, yearInfo);
                    servcieYear.OperationBusiness(this.BillNo);
                    break;

                case CE_FlowOperationType.暂存:
                    servcieYear.SaveInfo(detailTable, yearInfo);
                    break;

                case CE_FlowOperationType.回退:
                    break;

                case CE_FlowOperationType.未知:
                    break;

                default:
                    break;
                }

                if (!servcieYear.IsExist(this.BillNo))
                {
                    MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面");
                    return(false);
                }

                return(true);
            }
            catch (Exception ex)
            {
                MessageDialog.ShowPromptMessage(ex.Message);
                return(false);
            }
        }
        bool 样品确认申请单_Form_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            try
            {
                Business_Sample_ConfirmTheApplication lnqBillInfo =
                    form.ResultInfo as Business_Sample_ConfirmTheApplication;

                this.OperationType = GeneralFunction.StringConvertToEnum <CE_FlowOperationType>(form.ResultList[0].ToString());
                this.BillNo        = lnqBillInfo.BillNo;

                switch (this.OperationType)
                {
                case CE_FlowOperationType.提交:
                    OperationAssociationBusiness(lnqBillInfo);
                    m_serviceSample.SaveInfo(lnqBillInfo);
                    m_serviceSample.OperatarUnFlowBusiness(lnqBillInfo.BillNo);
                    break;

                case CE_FlowOperationType.暂存:
                    m_serviceSample.SaveInfo(lnqBillInfo);
                    break;

                case CE_FlowOperationType.回退:
                    break;

                case CE_FlowOperationType.未知:
                    break;

                default:
                    break;
                }

                if (!m_serviceSample.IsExist(lnqBillInfo.BillNo))
                {
                    MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面");
                    return(false);
                }

                return(true);
            }
            catch (Exception ex)
            {
                MessageDialog.ShowPromptMessage(ex.Message);
                return(false);
            }
        }
Esempio n. 13
0
        private bool 生产BOM变更单_Form_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            try
            {
                Bus_PBOM_Change lnqBillInfo = form.ResultInfo as Bus_PBOM_Change;
                List <View_Bus_PBOM_Change_Detail> detailInfo = form.ResultList[0] as List <View_Bus_PBOM_Change_Detail>;

                this.OperationType = form.FlowOperationType;
                this.BillNo        = lnqBillInfo.BillNo;
                string billStatus = _serviceFlow.GetNowBillStatus(this.BillNo);

                if (billStatus == "" || billStatus == CE_CommonBillStatus.新建单据.ToString())
                {
                    _servicePBOMChange.SaveInfo(lnqBillInfo, detailInfo);
                }

                switch (this.OperationType)
                {
                case CE_FlowOperationType.提交:
                    this.NotifyPersonnel = form.FlowInfo_NotifyInfo;
                    _servicePBOMChange.OperatarUnFlowBusiness(lnqBillInfo.BillNo);
                    break;

                case CE_FlowOperationType.暂存:
                case CE_FlowOperationType.回退:
                case CE_FlowOperationType.未知:
                    break;

                default:
                    break;
                }

                if (!_servicePBOMChange.IsExist(lnqBillInfo.BillNo))
                {
                    MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面");
                    return(false);
                }

                return(true);
            }
            catch (Exception ex)
            {
                MessageDialog.ShowPromptMessage(ex.Message);
                return(false);
            }
        }
Esempio n. 14
0
        private bool 纠正预防措施报告_Form_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            IEightDReport serviceEightD =
                Service_Quality_QC.ServerModuleFactory.GetServerModule <IEightDReport>();

            try
            {
                Bus_Quality_8DReport reportInfo = form.ResultInfo as Bus_Quality_8DReport;
                this.OperationType = GeneralFunction.StringConvertToEnum <CE_FlowOperationType>(form.ResultList[0].ToString());
                this.BillNo        = reportInfo.BillNo;

                switch (this.OperationType)
                {
                case CE_FlowOperationType.提交:
                    CheckData(reportInfo);
                    serviceEightD.SaveInfo(reportInfo);
                    break;

                case CE_FlowOperationType.暂存:
                    serviceEightD.SaveInfo(reportInfo);
                    break;

                case CE_FlowOperationType.回退:
                    break;

                case CE_FlowOperationType.未知:
                    break;

                default:
                    break;
                }

                if (!serviceEightD.IsExist(reportInfo.BillNo))
                {
                    MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面");
                    return(false);
                }

                return(true);
            }
            catch (Exception ex)
            {
                MessageDialog.ShowPromptMessage(ex.Message);
                return(false);
            }
        }
        bool 发料清单编制主界面_Form_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            try
            {
                List <View_S_DebitSchedule> listInfo = form.ResultInfo as List <View_S_DebitSchedule>;

                CE_FlowOperationType flowOperationType = GeneralFunction.StringConvertToEnum <CE_FlowOperationType>(form.ResultList[0].ToString());
                string edition = form.ResultList[1].ToString();
                CE_DebitScheduleApplicable applicable = GeneralFunction.StringConvertToEnum <CE_DebitScheduleApplicable>(form.ResultList[2].ToString());

                switch (flowOperationType)
                {
                case CE_FlowOperationType.提交:
                    m_findProductOrder.SaveInfo(listInfo, form.FlowInfo_BillNo, edition, applicable);
                    m_findProductOrder.OperationInfo(listInfo, form.FlowInfo_BillNo, edition, applicable);
                    break;

                case CE_FlowOperationType.暂存:
                    m_findProductOrder.SaveInfo(listInfo, form.FlowInfo_BillNo, edition, applicable);
                    break;

                case CE_FlowOperationType.回退:
                    break;

                case CE_FlowOperationType.未知:
                    break;

                default:
                    break;
                }

                if (!m_findProductOrder.IsExist(form.FlowInfo_BillNo))
                {
                    MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面");
                    return(false);
                }

                return(true);
            }
            catch (Exception ex)
            {
                MessageDialog.ShowPromptMessage(ex.Message);
                return(false);
            }
        }
        bool frm_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            try
            {
                Business_QualityManagement_Isolation lnqInPut = form.ResultList[0] as Business_QualityManagement_Isolation;

                this.OperationType = GeneralFunction.StringConvertToEnum <CE_FlowOperationType>(form.ResultList[1].ToString());
                this.BillNo        = lnqInPut.BillNo;

                switch (this.OperationType)
                {
                case CE_FlowOperationType.提交:
                    m_serviceIsolation.SaveInfo(lnqInPut);
                    m_serviceIsolation.FinishBill(lnqInPut.BillNo);
                    break;

                case CE_FlowOperationType.暂存:
                    m_serviceIsolation.SaveInfo(lnqInPut);
                    break;

                case CE_FlowOperationType.回退:
                    break;

                case CE_FlowOperationType.未知:
                    break;

                default:
                    break;
                }

                if (!m_serviceIsolation.IsExist(lnqInPut.BillNo))
                {
                    MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面");
                    return(false);
                }

                return(true);
            }
            catch (Exception ex)
            {
                MessageDialog.ShowPromptMessage(ex.Message);
                return(false);
            }
        }
        bool frm_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            try
            {
                Business_CWQC_CreativePersentation             lnqSaveInfo    = form.ResultList[0] as Business_CWQC_CreativePersentation;
                Business_CWQC_CreativePersentation_EffectValue lnqEffectValue = form.ResultList[2] as Business_CWQC_CreativePersentation_EffectValue;
                this.OperationType = GeneralFunction.StringConvertToEnum <CE_FlowOperationType>(form.ResultList[1].ToString());
                this.BillNo        = lnqSaveInfo.BillNo;

                switch (this.OperationType)
                {
                case CE_FlowOperationType.提交:
                    m_mainService.SaveInfo(lnqSaveInfo, lnqEffectValue);
                    break;

                case CE_FlowOperationType.暂存:
                    m_mainService.SaveInfo(lnqSaveInfo, lnqEffectValue);
                    break;

                case CE_FlowOperationType.回退:
                    break;

                case CE_FlowOperationType.未知:
                    break;

                default:
                    break;
                }

                if (!m_mainService.IsExist(lnqSaveInfo.BillNo))
                {
                    MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面");
                    return(false);
                }

                return(true);
            }
            catch (Exception ex)
            {
                MessageDialog.ShowPromptMessage(ex.Message);
                return(false);
            }
        }
Esempio n. 18
0
        bool frm_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            CE_FlowOperationType tempType = GlobalObject.GeneralFunction.StringConvertToEnum <CE_FlowOperationType>(form.ResultList[1].ToString());

            switch (tempType)
            {
            case CE_FlowOperationType.提交:
                if (!m_serverGoodsEntering.SubmitInfo(form.ResultList[0].ToString(),
                                                      (form.ResultInfo as BindingCollection <View_S_GoodsEnteringBill>).ToList(), out m_strErr))
                {
                    MessageDialog.ShowPromptMessage(m_strErr);
                    return(false);
                }
                break;

            case CE_FlowOperationType.暂存:
                if (!m_serverGoodsEntering.EditListInfo(form.ResultList[0].ToString(),
                                                        (form.ResultInfo as BindingCollection <View_S_GoodsEnteringBill>).ToList(), out m_strErr))
                {
                    MessageDialog.ShowPromptMessage(m_strErr);
                    return(false);
                }
                break;

            case CE_FlowOperationType.回退:
                break;

            case CE_FlowOperationType.未知:
                break;

            default:
                break;
            }

            if (!m_serverGoodsEntering.IsExist(form.FlowInfo_BillNo))
            {
                MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面");
                return(false);
            }

            return(true);
        }
        bool frm_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            FM_InstitutionProcess lnqProcess = (FM_InstitutionProcess)form.ResultInfo;

            if (!CheckData(lnqProcess))
            {
                return(false);
            }

            if (!m_serverInstitution.AddInfo(lnqProcess, null, out m_strErr))
            {
                MessageDialog.ShowPromptMessage(m_strErr);
                return(false);
            }
            else
            {
                MessageDialog.ShowPromptMessage("提交成功");
            }

            return(true);
        }
Esempio n. 20
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            foreach (DataGridViewRow dgvr in customDataGridView1.Rows)
            {
                string billNo = m_billNoControl.GetNewBillNo();

                bool isParallel = false;
                if (FlowInfo_NotifyInfo == null && m_serverFlow.IsPointPersonnel(billNo, out isParallel))
                {
                    CustomFlowForm flowForm = new CustomFlowForm();
                    if (!flowForm.GetNotifyPersonnel(true))
                    {
                        throw new Exception("请选择指定人或者角色点【确定】");
                    }
                    else
                    {
                        FlowInfo_NotifyInfo = flowForm.FlowInfo_NotifyInfo;
                    }
                }

                Business_QualityManagement_Isolation tempLnq = new Business_QualityManagement_Isolation();

                tempLnq.BatchNo         = dgvr.Cells["批次号"].Value.ToString();
                tempLnq.BillNo          = billNo;
                tempLnq.GoodsCount      = Convert.ToDecimal(dgvr.Cells["数量"].Value);
                tempLnq.GoodsID         = Convert.ToInt32(dgvr.Cells["物品ID"].Value);
                tempLnq.IsolationReason = dgvr.Cells["隔离原因及处理要求"].Value.ToString();
                tempLnq.StorageID       = dgvr.Cells["库房代码"].Value.ToString();
                tempLnq.Provider        = dgvr.Cells["供应商"].Value.ToString();

                m_isolationService.SaveInfo(tempLnq);
                m_isolationService.FinishBill(billNo);
                string keyWords = "【" + UniversalFunction.GetGoodsInfo(tempLnq.GoodsID).物品名称 + "】【" + tempLnq.BatchNo + "】";
                m_serverFlow.FlowPass(tempLnq.BillNo, "", tempLnq.StorageID, FlowInfo_NotifyInfo, keyWords);
            }

            MessageBox.Show("已全部提交");
            this.Close();
        }
Esempio n. 21
0
        private bool TCU软件升级_Form_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            CE_FlowOperationType tempType =
                GlobalObject.GeneralFunction.StringConvertToEnum <CE_FlowOperationType>(form.ResultList[0].ToString());

            switch (tempType)
            {
            case CE_FlowOperationType.提交:

                _ServiceTCU.SaveInfo_TCUSoft(form.ResultList[1] as Business_Project_TCU_SoftwareUpdate,
                                             form.ResultList[2] as List <View_Business_Project_TCU_SoftwareUpdate_DID>);

                _ServiceTCU.SubmitInfo_TCUSoft(form.FlowInfo_BillNo);
                break;

            case CE_FlowOperationType.暂存:

                _ServiceTCU.SaveInfo_TCUSoft(form.ResultList[1] as Business_Project_TCU_SoftwareUpdate,
                                             form.ResultList[2] as List <View_Business_Project_TCU_SoftwareUpdate_DID>);
                break;

            case CE_FlowOperationType.回退:
                break;

            case CE_FlowOperationType.未知:
                break;

            default:
                break;
            }

            if (!_ServiceTCU.IsExist(form.FlowInfo_BillNo))
            {
                MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面");
                return(false);
            }

            return(true);
        }
        private bool 供应商应付账款_Form_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            try
            {
                Bus_PurchasingMG_AccountBill lnqBillInfo = form.ResultInfo as Bus_PurchasingMG_AccountBill;

                List <Bus_PurchasingMG_AccountBill_Invoice> invoiceInfo =
                    form.ResultList[0] as List <Bus_PurchasingMG_AccountBill_Invoice>;
                List <View_Bus_PurchasingMG_AccountBill_Detail> detailInfo =
                    form.ResultList[1] as List <View_Bus_PurchasingMG_AccountBill_Detail>;

                this.OperationType = GeneralFunction.StringConvertToEnum <CE_FlowOperationType>(form.ResultList[2].ToString());
                this.BillNo        = lnqBillInfo.BillNo;

                switch (this.OperationType)
                {
                case CE_FlowOperationType.提交:

                    string billStatus = _Service_Flow.GetNextBillStatus(this.BillNo);

                    if (billStatus == CE_CommonBillStatus.单据完成.ToString())
                    {
                        string operationUser =
                            _Service_Flow.GetBusinessOperationInfo(this.BillNo).
                            Where(k => k.FlowID == 103).
                            OrderByDescending(k => k.OperationTime).
                            First().OperationPersonnel;

                        if (operationUser == BasicInfo.LoginID)
                        {
                            throw new Exception("【新建人】与【审核人】不能为同一个人");
                        }
                    }

                    _Service_Account.SaveInfo(lnqBillInfo, invoiceInfo, detailInfo);
                    _Service_Account.OperatarUnFlowBusiness(lnqBillInfo.BillNo);
                    break;

                case CE_FlowOperationType.暂存:
                    _Service_Account.SaveInfo(lnqBillInfo, invoiceInfo, detailInfo);
                    break;

                case CE_FlowOperationType.回退:
                    break;

                case CE_FlowOperationType.未知:
                    break;

                default:
                    break;
                }

                if (!_Service_Account.IsExist(lnqBillInfo.BillNo))
                {
                    MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面");
                    return(false);
                }

                return(true);
            }
            catch (Exception ex)
            {
                MessageDialog.ShowPromptMessage(ex.Message);
                return(false);
            }
        }
        bool 整台份请领单_Form_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            IWholeMachineRequisitionService m_serviceWholeMachine =
                Service_Manufacture_Storage.ServerModuleFactory.GetServerModule <IWholeMachineRequisitionService>();

            try
            {
                Business_WarehouseOutPut_WholeMachineRequisition lnqRequisition =
                    form.ResultList[0] as Business_WarehouseOutPut_WholeMachineRequisition;
                List <View_Business_WarehouseOutPut_WholeMachineRequisitionDetail> detailInfo =
                    form.ResultList[1] as List <View_Business_WarehouseOutPut_WholeMachineRequisitionDetail>;
                List <View_Business_WarehouseOutPut_WholeMachineRequisition_StorageID> storageInfo =
                    form.ResultList[2] as List <View_Business_WarehouseOutPut_WholeMachineRequisition_StorageID>;

                this.OperationType = GeneralFunction.StringConvertToEnum <CE_FlowOperationType>(form.ResultList[3].ToString());
                this.BillNo        = lnqRequisition.BillNo;

                switch (this.OperationType)
                {
                case CE_FlowOperationType.提交:
                    List <string> listBillNo = new List <string>();
                    m_serviceWholeMachine.SaveInfo(lnqRequisition, detailInfo, storageInfo);
                    m_serviceWholeMachine.AutoFirstMaterialRequisition(lnqRequisition.BillNo, out listBillNo);

                    if (listBillNo != null && listBillNo.Count > 0)
                    {
                        string msg = "";

                        foreach (string billNoTemp in listBillNo)
                        {
                            msg = msg + "【" + billNoTemp + "】,";
                        }

                        msg = msg.Substring(0, msg.Length - 1);

                        MessageDialog.ShowPromptMessage("已生成领料单 " + msg);
                    }

                    break;

                case CE_FlowOperationType.暂存:
                    m_serviceWholeMachine.SaveInfo(lnqRequisition, detailInfo, storageInfo);
                    break;

                case CE_FlowOperationType.回退:
                    break;

                case CE_FlowOperationType.未知:
                    break;

                default:
                    break;
                }

                if (!m_serviceWholeMachine.IsExist(lnqRequisition.BillNo))
                {
                    MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面");
                    return(false);
                }

                return(true);
            }
            catch (Exception ex)
            {
                MessageDialog.ShowPromptMessage(ex.Message);
                return(false);
            }
        }