Ejemplo n.º 1
0
        private void btnSystem_Click(object sender, EventArgs e)
        {
            IsysService service = sysService.GetService();

            var list = service.GetCmn("3022");

            if (list.Count > 0)
            {
                foreach (var l in list)
                {
                    switch (l.CODE)
                    {
                    case "0":
                        l.VALUE = nudDisk.Value.ToString();
                        break;

                    default:
                        break;
                    }
                }
            }

            service.UpdateDict(list);

            MsgBoxEx.Info("Save success, please refresh the data.");
        }
Ejemplo n.º 2
0
        private void btnWaferYield_Click(object sender, EventArgs e)
        {
            IsysService service = sysService.GetService();

            //yield
            var list = service.GetCmn("3010");

            if (list.Count > 0)
            {
                foreach (var l in list)
                {
                    switch (l.CODE)
                    {
                    case "0":
                        l.VALUE = nudLotYield.Value.ToString();
                        break;

                    case "1":
                        l.VALUE = nudWaferYield.Value.ToString();
                        break;

                    default:
                        break;
                    }
                }
            }

            var rs = service.UpdateDict(list);

            if (rs == "0")
            {
                DataCache.CmnDict = service.GetCmn("");
            }

            MsgBoxEx.Info("Save success, please refresh the data.");
        }
Ejemplo n.º 3
0
        private void DataOperation(int type)
        {
            string sdate = string.Empty;
            string edate = string.Empty;

            if (type == 0)
            {
                if (rbtASpecified.Checked == true)
                {
                    if (dtpAfrom.Value > dtpAto.Value)
                    {
                        MsgBoxEx.Info("Start time cannot be greater than end time.");
                        return;
                    }

                    sdate = dtpAfrom.Value.ToString("yyyyMMdd");
                    edate = dtpAto.Value.ToString("yyyyMMdd");
                }
                else
                {
                    sdate = DateTime.MinValue.ToString("yyyyMMdd");
                    edate = dtpAless.Value.ToString("yyyyMMdd");
                }
            }
            else if (type == 1)
            {
                if (rbtRSpecified.Checked == true)
                {
                    if (dtpRfrom.Value > dtpRto.Value)
                    {
                        MsgBoxEx.Info("Start time cannot be greater than end time.");
                        return;
                    }

                    sdate = dtpRfrom.Value.ToString("yyyyMMdd");
                    edate = dtpRto.Value.ToString("yyyyMMdd");
                }
                else
                {
                    sdate = DateTime.MinValue.ToString("yyyyMMdd");
                    edate = dtpRless.Value.ToString("yyyyMMdd");
                }
            }
            else if (type == 2)
            {
                if (rbtDSpecified.Checked == true)
                {
                    if (dtpDfrom.Value > dtpDto.Value)
                    {
                        MsgBoxEx.Info("Start time cannot be greater than end time.");
                        return;
                    }

                    sdate = dtpDfrom.Value.ToString("yyyyMMdd");
                    edate = dtpDto.Value.ToString("yyyyMMdd");
                }
                else
                {
                    sdate = DateTime.MinValue.ToString("yyyyMMdd");
                    edate = dtpDless.Value.ToString("yyyyMMdd");
                }
            }

            try
            {
                ShowLoading(ToopEnum.loading);

                IwrService service = wrService.GetService();

                var msg = service.DataArchive(sdate, edate, type.ToString());

                MsgBoxEx.Info(msg);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                //3020
                IsysService service = sysService.GetService();

                var list = service.GetCmn("3020");

                if (list[0].CODE == "1")
                {
                    list[0].CODE = "0";

                    service.UpdateDict(list);
                }

                CloseLoading();
            }
        }