Exemplo n.º 1
0
        private void SaveCommand()
        {
            string typ = "";

            Progress.ProcessingText = PDMsg.ProgressUpdateText;
            Progress.Start();
            _cpgbll.SaveCPRptControlPlan(ControlPlanRptModel, ref typ);
            Progress.End();
            if (typ == "UPD")
            {
                ShowInformationMessage(PDMsg.UpdatedSuccessfully);
                _logviewBll.SaveLog(ControlPlanRptModel.PartNo, "Control_plan members");
            }
            else
            {
                ShowInformationMessage(PDMsg.SavedSuccessfully);
                _logviewBll.SaveLog(ControlPlanRptModel.PartNo, "Control_plan members");
            }
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        private void SaveECNOrPCN()
        {
            string smessage = "";

            try
            {
                PartNumberIsFocused            = true;
                drwBll.IsDefaultSubmitRequired = true;
                //if (DDPCNECNModel.PART_NO.ToValueAsString().Trim() == "")
                if (PartNo.ToValueAsString().Trim() == "")
                {
                    ShowInformationMessage(PDMsg.NotEmpty("Part No."));
                    return;
                }

                smessage = (_screenType == "ECN" ? "ECN" : "PCN");
                if (PCNSheetNo.ToValueAsString().Trim() == "")
                {
                    ShowInformationMessage(PDMsg.NotEmpty(smessage + " Number"));
                    return;
                }
                //if (DDPCNECNModel.SFL_DRAW_ISSUENO.ToValueAsString().Trim() == "")
                if (SFLDrawIssueNo.ToValueAsString().Trim() == "")
                {
                    ShowInformationMessage(PDMsg.NotEmpty("Pro.Seq.Drg.Issue No."));
                    return;
                }

                if (SFLDrawIssueNo1.ToValueAsString().Trim() == "")
                {
                    ShowInformationMessage(PDMsg.NotEmpty("Pro.Drg.Issue No."));
                    return;
                }

                if (ActionMode == OperationMode.AddNew)
                {
                    LostFocusPartNo();
                }
                //LostFocusPartNo();
                DDPCNECNModel.PART_NO           = PartNo;
                DDPCNECNModel.SFL_DRAW_ISSUENO  = Convert.ToDecimal(SFLDrawIssueNo);
                DDPCNECNModel.SFL_DRAW_ISSUENO1 = Convert.ToDecimal(SFLDrawIssueNo1);
                DDPCNECNModel.PRODUCT_CHANGE_NO = PCNSheetNo;
                if (DDPCNECNModel.PART_NO.ToValueAsString() != "")
                {
                    if (RE_PPAP == true)
                    {
                        DDPCNECNModel.RE_PPAP = true;
                    }
                    else
                    {
                        DDPCNECNModel.RE_PPAP = false;
                    }
                    if (DDPCNECNModel.PART_NO.ToValueAsString().Trim() != "" &&
                        DDPCNECNModel.PRODUCT_CHANGE_NO.ToValueAsString().Trim() != "" &&
                        DDPCNECNModel.SFL_DRAW_ISSUENO.ToValueAsString().Trim() != "")
                    {
                        Progress.ProcessingText = PDMsg.ProgressUpdateText;
                        Progress.Start();
                        drwBll.SaveECNMPSDetails(DDPCNECNModel, DDPCNECNModel.PART_NO, _screenType, ActionMode);

                        Progress.End();
                    }
                    if (ActionMode == OperationMode.AddNew)
                    {
                        ShowInformationMessage(PDMsg.SavedSuccessfully);
                        _logviewBll.SaveLog(DDPCNECNModel.PART_NO, "ECN/PCN");
                    }
                    else
                    {
                        ShowInformationMessage(PDMsg.UpdatedSuccessfully);
                        _logviewBll.SaveLog(DDPCNECNModel.PART_NO, "ECN/PCN");
                    }
                    if (isPrintClicked != true)
                    {
                        // AddECNOrPCN();
                    }
                }

                try
                {
                    if (ActionMode == OperationMode.AddNew)
                    {
                        string oldPartNo     = PartNo;
                        string oldPCNSheetNo = PCNSheetNo;
                        int    i             = 0;
                        PartNumberIsFocused = true;
                        EditECNOrPCN();
                        foreach (DataRowView drView in DvDD_PCN)
                        {
                            if (drView["PRODUCT_CHANGE_NO"].ToString() == oldPCNSheetNo && drView["PART_NO"].ToString() == oldPartNo)
                            {
                                PartNo = oldPartNo;
                                NotifyPropertyChanged("PartNo");
                                SelectedRow = DvDD_PCN[i];
                                SelectChangeComboPart();
                                //NotifyPropertyChanged("SelectedRow");
                                //GetECNMPSDetails();
                                break;
                            }
                            i = i + 1;
                        }
                    }
                }
                catch (Exception ex1)
                {
                }

                //NotifyPropertyChanged("SelectedRow");
            }
            catch (Exception ex)
            {
                throw ex.LogException();
            }
        }
Exemplo n.º 3
0
        private void SaveCommand()
        {
            IsRecordsUpdated = false;
            if (!TFCMODEL.PartNo.IsNotNullOrEmpty())
            {
                ShowInformationMessage(PDMsg.NotEmpty("Part Number"));
                return;
            }
            else if (TFCMODEL.AUTOPARTYES == false && TFCMODEL.AUTOPARTNO == false)
            {
                ShowInformationMessage(PDMsg.NotEmpty("Auto Part"));
                return;
            }
            else if ((TFCMODEL.PROTOTYPE || TFCMODEL.PRELAUNCH || TFCMODEL.PRODUCTION) == false)
            {
                ShowInformationMessage(PDMsg.NotEmpty("Customer Programme"));
                return;
            }
            else if ((TFCMODEL.FEASIBLECHANGE || TFCMODEL.FEASIBLEPRODUCT || TFCMODEL.NOTFEASIBLE) == false)
            {
                ShowInformationMessage(PDMsg.NotEmpty("Conclusion"));
                return;
            }
            else
            {
                if (TFCMODEL.AUTOPARTYES == true)
                {
                    TFCMODEL.AUTO_PART = "Y";
                }
                else if (TFCMODEL.AUTOPARTNO == true)
                {
                    TFCMODEL.AUTO_PART = "N";
                }

                if (TFCMODEL.PROTOTYPE == true)
                {
                    TFCMODEL.CUST_PROG = "PT";
                }
                else if (TFCMODEL.PRELAUNCH == true)
                {
                    TFCMODEL.CUST_PROG = "PL";
                }
                else if (TFCMODEL.PRODUCTION == true)
                {
                    TFCMODEL.CUST_PROG = "PR";
                }

                if (TFCMODEL.FEASIBLEPRODUCT == true)
                {
                    TFCMODEL.CONCLUSION = Convert.ToString("1");
                }
                else if (TFCMODEL.FEASIBLECHANGE == true)
                {
                    TFCMODEL.CONCLUSION = Convert.ToString("2");
                }
                else if (TFCMODEL.NOTFEASIBLE == true)
                {
                    TFCMODEL.CONCLUSION = Convert.ToString("3");
                }
                GridValues();
                string mode = "";
                bool   val  = tfcbll.AddEditTfc(TFCMODEL, mode);
                IsRecordsUpdated = true;
                if (val == true)
                {
                    ShowInformationMessage(PDMsg.SavedSuccessfully);
                    _logviewBll.SaveLog(TFCMODEL.PartNo, "TFC");
                }
                else
                {
                    ShowInformationMessage(PDMsg.UpdatedSuccessfully);
                    _logviewBll.SaveLog(TFCMODEL.PartNo, "TFC");
                }
                // Clear();
            }
        }