private void _MT01View_eventShowDetails(object sender, EventArgs e)
        {
            EgateArgs args = (EgateArgs)e;

            if (string.IsNullOrEmpty((string)args.EgateDictionary["LOT_NO"].ToString()))
            {
                WriteTips(5, "No Material selected");
            }
            else
            {
                QCMaterial s = new QCMaterial
                {
                    SampleName     = args.EgateDictionary["SampleName"].ToString(),
                    LOT_NO         = args.EgateDictionary["LOT_NO"].ToString(),
                    Description_EN = args.EgateDictionary["Description_EN"].ToString(),
                    Description_TW = args.EgateDictionary["Description_TW"].ToString(),
                    Description_CN = args.EgateDictionary["Description_CN"].ToString(),
                    Description_VN = args.EgateDictionary["Description_VN"].ToString(),
                    IsGrade        = Convert.ToBoolean(args.EgateDictionary["IsGrade"])
                };

                _MT01Dialog.Material = s;

                if (_MT01Dialog.ShowDialog() == DialogResult.OK)
                {
                    Query();
                    WriteTips(5, "Save Successful!");
                }
            }
        }
Пример #2
0
        void _SPC1View_eventShowDetails(object sender, EventArgs e)
        {
            EgateArgs args = (EgateArgs)e;

            _SPC1Dialog.Clear();

            _SPC1Dialog.Chart = new QCChart
            {
                SampleName = (string)args.EgateDictionary["SampleName"],
                MaterialNo = (string)args.EgateDictionary["LOT_NO"],
                LineNo     = (string)args.EgateDictionary["LINE"],
                Property   = (string)args.EgateDictionary["PropertyName"],
                UCL        = (decimal)args.EgateDictionary["UCL"],
                LCL        = (decimal)args.EgateDictionary["LCL"],
                Date       = (DateTime)args.EgateDictionary["CreateDate"],
                Remark     = (string)args.EgateDictionary["Remark"]
            };
            _SPC1Dialog._STEP = STEP.Edit;

            _SPC1Dialog.ShowDialog();

            if (_SPC1Dialog.rValue)
            {
                string msg = _SPC1Dialog.ReadyWork;
                if (string.IsNullOrEmpty(msg))
                {
                    if (!biz.UpdateChartUCL2LCL(_SPC1Dialog.Chart))
                    {
                        WriteTips(5, CultureLanuage.Translator(this.Name, 8, "Update ChartUCL2LCL Error!"));
                    }
                    else
                    {
                        WriteTips(5, CultureLanuage.Translator(this.Name, 9, "Update Control Line: {0} - {1} succesfull!", _SPC1Dialog.Chart.SampleName, _SPC1Dialog.Chart.Property));
                        Query();
                    }
                }
                else
                {
                    MessageBox.Show(msg);
                    WriteTips(5, msg);
                }
            }
        }
Пример #3
0
        void _AT01View_eventShowDetails(object sender, EventArgs e)
        {
            EgateArgs args = (EgateArgs)e;

            //_AT01Dialog = new AT01Dialog();

            if (string.IsNullOrEmpty((string)args.EgateDictionary["SampleName"].ToString()))
            {
                // WriteTips(5, CultureLanguage.Translator(this.Name, 3, "No sample name selected"));
                WriteTips(5, "No sample name selected");
            }
            else
            {
                QCAttribute s = new QCAttribute();
                s.SampleName = (string)args.EgateDictionary["SampleName"].ToString();

                s.PropertyName           = (string)args.EgateDictionary["PropertyName"].ToString();
                s.Description_EN         = (string)args.EgateDictionary["Description_EN"].ToString();
                s.Description_TW         = (string)args.EgateDictionary["Description_TW"].ToString();
                s.Description_CN         = (string)args.EgateDictionary["Description_CN"].ToString();
                s.Description_VN         = (string)args.EgateDictionary["Description_VN"].ToString();
                s.Unit                   = (string)args.EgateDictionary["Unit"].ToString();
                s.Prec                   = Convert.ToInt32(args.EgateDictionary["Prec"].ToString());
                s.Remark                 = (string)args.EgateDictionary["Remark"].ToString();
                s.EnRemark               = (string)args.EgateDictionary["EnRemark"].ToString();
                s.JPNRemark              = (string)args.EgateDictionary["JPNRemark"].ToString();
                s.OrderBy                = Convert.ToInt32(args.EgateDictionary["OrderBy"].ToString());
                _AT01Dialog.SetAttribute = s;

                if (_AT01Dialog.ShowDialog() == DialogResult.OK)
                {
                    Query();
                    WriteTips(5, "Save Successful!");
                }
            }
        }