Esempio n. 1
0
        public bool GetNotifyPersonnel()
        {
            FlowInfo_NotifyInfo = new NotifyPersonnelInfo();
            FormSelectPersonnel2 frm = new FormSelectPersonnel2();

            if (frm.ShowDialog() != DialogResult.OK)
            {
                return(false);
            }

            FlowInfo_NotifyInfo = frm.SelectedNotifyPersonnelInfo;
            return(true);
        }
Esempio n. 2
0
        public bool GetNotifyPersonnel(bool isMultiSelect)
        {
            flowInfo_NotifyInfo = new NotifyPersonnelInfo();
            FormSelectPersonnel2 frm = new FormSelectPersonnel2();

            frm.IsMultiSelect = isMultiSelect;

            if (frm.ShowDialog() != DialogResult.OK)
            {
                return(false);
            }

            flowInfo_NotifyInfo = frm.SelectedNotifyPersonnelInfo;
            return(true);
        }
Esempio n. 3
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. 4
0
        private bool 纠正预防措施报告明细_PanelGetDataInfo(CE_FlowOperationType flowOperationType)
        {
            try
            {
                GetInfo();

                Flow_FlowInfo info =
                    _Service_Flow.GetNowFlowInfo(_Service_Flow.GetBusinessTypeID(CE_BillTypeEnum.纠正预防措施报告, null),
                                                 _Lnq_BillInfo.BillNo);

                if (flowOperationType == CE_FlowOperationType.提交)
                {
                    NotifyPersonnelInfo       personnelInfo = new NotifyPersonnelInfo();
                    List <PersonnelBasicInfo> lstInfo       = new List <PersonnelBasicInfo>();
                    PersonnelBasicInfo        infoTemp      = new PersonnelBasicInfo();

                    switch (info.FlowID)
                    {
                    case 1109:
                        if (GeneralFunction.IsNullOrEmpty(_Lnq_BillInfo.D1_DutyDepartment))
                        {
                            throw new Exception("请选择【调查改善担当部门】");
                        }
                        break;

                    case 1110:
                    case 1112:
                        IBillMessagePromulgatorServer serviceBillMessage =
                            BasicServerFactory.GetServerModule <IBillMessagePromulgatorServer>();

                        List <string> lstRoleName = serviceBillMessage.GetSuperior(CE_RoleStyleType.负责人,
                                                                                   UniversalFunction.GetDeptCode(_Lnq_BillInfo.D1_DutyDepartment));

                        personnelInfo.UserType = BillFlowMessage_ReceivedUserType.角色.ToString();
                        foreach (string item in lstRoleName)
                        {
                            infoTemp    = new PersonnelBasicInfo();
                            infoTemp.角色 = item;
                            lstInfo.Add(infoTemp);
                        }

                        personnelInfo.PersonnelBasicInfoList = lstInfo;
                        this.FlowInfo_NotifyInfo             = personnelInfo;
                        break;

                    case 1111:

                        if (GeneralFunction.IsNullOrEmpty(_Lnq_BillInfo.D2_DutyPersonnel))
                        {
                            throw new Exception("请指定【改善小组组长】");
                        }

                        personnelInfo.UserType = BillFlowMessage_ReceivedUserType.用户.ToString();
                        infoTemp    = new PersonnelBasicInfo();
                        infoTemp.工号 = _Lnq_BillInfo.D2_DutyPersonnel;
                        lstInfo.Add(infoTemp);

                        personnelInfo.PersonnelBasicInfoList = lstInfo;
                        this.FlowInfo_NotifyInfo             = personnelInfo;
                        break;

                    default:
                        break;
                    }
                }

                this.FlowInfo_BillNo = txtBillNo.Text;
                this.ResultInfo      = _Lnq_BillInfo;

                this.ResultList = new List <object>();
                this.ResultList.Add(flowOperationType);

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