コード例 #1
0
ファイル: SMTNight.cs プロジェクト: Andreissw/SMTReport
 void Vypysk6Oracle()
 {
     ClassDay.vypyskOracle(ModelLabel6.Text, st6, st7, DateTime.Now.AddDays(день).ToString("dd.MM.yyyy"), Vyp622, LabelLine6.Text);
     ClassDay.vypyskOracle(ModelLabel6.Text, st7, st8, DateTime.Now.AddDays(день).ToString("dd.MM.yyyy"), Vyp600, LabelLine6.Text);
     ClassNight.vypyskOracle(ModelLabel6.Text, sttime8, sttime0, DateTime.Now.AddDays(-1).ToString("dd.MM.yyyy"), DateTime.Now.ToString("dd.MM.yyyy"), Vyp610, LabelLine6.Text);
     ClassDay.vypyskOracle(ModelLabel6.Text, sttime0, sttime1, DateTime.Now.ToString("dd.MM.yyyy"), Vyp612, LabelLine6.Text);
     ClassDay.vypyskOracle(ModelLabel6.Text, sttime1, sttime2, DateTime.Now.ToString("dd.MM.yyyy"), Vyp614, LabelLine6.Text);
     ClassDay.vypyskOracle(ModelLabel6.Text, sttime2, sttime3, DateTime.Now.ToString("dd.MM.yyyy"), Vyp616, LabelLine6.Text);
     ClassNight.vypyskOracle(ModelLabel6.Text, st6, sttime3, DateTime.Now.AddDays(-1).ToString("dd.MM.yyyy"), DateTime.Now.ToString("dd.MM.yyyy"), Vyp6All, LabelLine6.Text);
 }
コード例 #2
0
ファイル: SMTNight.cs プロジェクト: Andreissw/SMTReport
 void Otkaz7Oracle()
 {
     ClassDay.OtkazOracle(ModelLabel7.Text, st6, st7, DateTime.Now.AddDays(день).ToString("dd.MM.yyyy"), Otkaz722, LabelLine7.Text);
     ClassDay.OtkazOracle(ModelLabel7.Text, st7, st8, DateTime.Now.AddDays(день).ToString("dd.MM.yyyy"), Otkaz700, LabelLine7.Text);
     ClassNight.OtkazOracle(ModelLabel7.Text, sttime8, sttime0, DateTime.Now.AddDays(-1).ToString("dd.MM.yyyy"), DateTime.Now.ToString("dd.MM.yyyy"), Otkaz710, LabelLine7.Text);
     ClassDay.OtkazOracle(ModelLabel7.Text, sttime0, sttime1, DateTime.Now.ToString("dd.MM.yyyy"), Otkaz712, LabelLine7.Text);
     ClassDay.OtkazOracle(ModelLabel7.Text, sttime1, sttime2, DateTime.Now.ToString("dd.MM.yyyy"), Otkaz714, LabelLine7.Text);
     ClassDay.OtkazOracle(ModelLabel7.Text, sttime2, sttime3, DateTime.Now.ToString("dd.MM.yyyy"), Otkaz716, LabelLine7.Text);
     ClassNight.OtkazOracle(ModelLabel7.Text, st6, sttime3, DateTime.Now.AddDays(-1).ToString("dd.MM.yyyy"), DateTime.Now.ToString("dd.MM.yyyy"), Otkaz7All, LabelLine7.Text);
 }
コード例 #3
0
 private void Отправка_Tick(object sender, EventArgs e)
 {
     ClassNight.SendEmail(@"C:\Скриншот\" + count.ToString() + ".jpg", "SMT-Дневная-Карта");
     Отправка.Enabled = false;
     this.Close();
 }
コード例 #4
0
ファイル: SMTNight.cs プロジェクト: Andreissw/SMTReport
        private void ОбновлениеОтчета(int k = 0)
        {
            try
            {
                DateTime now = DateTime.Now;
                очистка();
                All.Rows.Add(25);

                GSC593TOP = 94.00;
                GSC593bot = 95.80;
                TH        = 98.50;
                TA        = 98.50;
                bot       = 98.00;
                top       = 95.80;

                #region Время переменные
                sttime0 = "00:00";
                sttime1 = "02:00";
                sttime2 = "04:00";
                sttime3 = "06:00";
                sttime4 = "08:00";
                sttime8 = "22:00";
                st6     = "18:00";
                st7     = "20:00";
                st8     = "22:00";
                st9     = "23:59";



                #endregion

                //DateTime.Now = SMTDay.now.AddDays(k);
                StartdateOmron = now.ToString("yyyy-MM-dd");
                EnddateOmron   = now.AddDays(1).ToString("yyyy-MM-dd");
                yearLB.Text    = now.ToString("dd.MM.yyyy");
                HrLB.Text      = now.ToString("HH:mm:ss");


                //if (Convert.ToDateTime(DateTime.Now.ToString("HH:mm:ss")) <= Convert.ToDateTime(now.ToString("09:50:00")))
                //{
                //    StatusLabel();
                //}

                //if (Convert.ToDateTime(DateTime.Now.ToString("HH:mm:ss")) >= Convert.ToDateTime(now.ToString("08:03:00")))
                //{
                //    StatusLabel();
                //}

                ClassNight.SpisokModels(DG, DGOracle, All, now.ToString("yyyy-MM-dd"), now.AddDays(-1).ToString("dd.MM.yyyy"), now.AddDays(1).ToString("yyyy-MM-dd"), now.ToString("dd.MM.yyyy"));


                #region ЦИКЛ который раставляет МОДЕЛЬ по порядку
                ClassDay.SPModelLine(LineLabel1, ModelLabel1, All, 0);
                ClassDay.SPModelLine(LineLabel2, ModelLabel2, All, 1);
                ClassDay.SPModelLine(LineLabel3, ModelLabel3, All, 2);
                ClassDay.SPModelLine(LineLabel4, ModelLabel4, All, 3);
                ClassDay.SPModelLine(LineLabel5, ModelLabel5, All, 4);
                ClassDay.SPModelLine(LineLabel6, ModelLabel6, All, 5);
                ClassDay.SPModelLine(LineLabel7, ModelLabel7, All, 6);
                #endregion



                #region ЦИКЛ который раставляет ЛИНИЮ по порядку
                ClassDay.SPModelLines(All, LabelLine1, Status1, 0);
                ClassDay.SPModelLines(All, LabelLine2, Status2, 1);
                ClassDay.SPModelLines(All, LabelLine3, Status3, 2);
                ClassDay.SPModelLines(All, LabelLine4, Status4, 3);
                ClassDay.SPModelLines(All, LabelLine5, Status5, 4);
                ClassDay.SPModelLines(All, LabelLine6, Status6, 5);
                ClassDay.SPModelLines(All, LabelLine7, Status7, 6);
                #endregion

                if (Status1.Text == "-")
                {
                    GroupAll.Visible = false;
                }
                else if (Status1.Text == "Omron")
                {
                    Vyp1Omron(); Otkaz1Omron(); FPY1(); ClassDay.Топ_Omron(TopLine1, now.AddDays(-1).ToString("yyyy-MM-dd"), now.ToString("yyyy-MM-dd"), "20:00:00", "08:00:00", ModelLabel1.Text);
                }
                else if (Status1.Text == "Oracle")
                {
                    Vypysk1Oracle(); Otkaz1Oracle(); FPY1(); ClassDay.ТопОшибокSMTНОЧЬ(TopLine1, DateTime.Now.AddDays(-1).ToString("dd.MM.yyyy"), DateTime.Now.AddDays(0).ToString("dd.MM.yyyy"), "18:00:00", "06:00:00", ModelLabel1.Text, LabelLine1.Text);
                }

                if (Status2.Text == "-")
                {
                    SMTGroup2.Visible = false;
                }
                else if (Status2.Text == "Omron")
                {
                    Vyp2Omron(); Otkaz2Omron(); FPY2(); ClassDay.Топ_Omron(TopLine2, now.AddDays(-1).ToString("yyyy-MM-dd"), now.ToString("yyyy-MM-dd"), "20:00:00", "08:00:00", ModelLabel2.Text);
                }
                else if (Status2.Text == "Oracle")
                {
                    Vypysk2Oracle(); Otkaz2Oracle(); FPY2(); ClassDay.ТопОшибокSMTНОЧЬ(TopLine2, DateTime.Now.AddDays(-1).ToString("dd.MM.yyyy"), DateTime.Now.AddDays(0).ToString("dd.MM.yyyy"), "18:00:00", "06:00:00", ModelLabel2.Text, LabelLine2.Text);
                }

                if (Status3.Text == "-")
                {
                    SMTGroup3.Visible = false;
                }
                else if (Status3.Text == "Omron")
                {
                    Vyp3Omron(); Otkaz3Omron(); FPY3(); ClassDay.Топ_Omron(TopLine3, now.AddDays(-1).ToString("yyyy-MM-dd"), now.ToString("yyyy-MM-dd"), "20:00:00", "08:00:00", ModelLabel3.Text);
                }
                else if (Status3.Text == "Oracle")
                {
                    Vypysk3Oracle(); Otkaz3Oracle(); FPY3(); ClassDay.ТопОшибокSMTНОЧЬ(TopLine3, DateTime.Now.AddDays(-1).ToString("dd.MM.yyyy"), DateTime.Now.AddDays(0).ToString("dd.MM.yyyy"), "18:00:00", "06:00:00", ModelLabel3.Text, LabelLine3.Text);
                }

                if (Status4.Text == "-")
                {
                    SMTGroup4.Visible = false;
                }
                else if (Status4.Text == "Omron")
                {
                    Vyp4Omron(); Otkaz4Omron(); FPY4(); ClassDay.Топ_Omron(TopLine4, now.AddDays(-1).ToString("yyyy-MM-dd"), now.ToString("yyyy-MM-dd"), "20:00:00", "08:00:00", ModelLabel4.Text);
                }
                else if (Status4.Text == "Oracle")
                {
                    Vypysk4Oracle(); Otkaz4Oracle(); FPY4(); ClassDay.ТопОшибокSMTНОЧЬ(TopLine4, DateTime.Now.AddDays(-1).ToString("dd.MM.yyyy"), DateTime.Now.AddDays(0).ToString("dd.MM.yyyy"), "18:00:00", "06:00:00", ModelLabel4.Text, LabelLine4.Text);
                }

                if (Status5.Text == "-")
                {
                    SMTGroup5.Visible = false;
                }
                else if (Status5.Text == "Omron")
                {
                    Vyp5Omron(); Otkaz5Omron(); FPY5(); ClassDay.Топ_Omron(TopLine5, now.AddDays(-1).ToString("yyyy-MM-dd"), now.ToString("yyyy-MM-dd"), "20:00:00", "08:00:00", ModelLabel5.Text);
                }
                else if (Status5.Text == "Oracle")
                {
                    Vypysk5Oracle(); Otkaz5Oracle(); FPY5(); ClassDay.ТопОшибокSMTНОЧЬ(TopLine5, DateTime.Now.AddDays(-1).ToString("dd.MM.yyyy"), DateTime.Now.AddDays(0).ToString("dd.MM.yyyy"), "18:00:00", "06:00:00", ModelLabel5.Text, LabelLine5.Text);
                }

                if (Status6.Text == "-")
                {
                    SMTGroup6.Visible = false;
                }
                else if (Status6.Text == "Omron")
                {
                    Vyp6Omron(); Otkaz6Omron(); FPY6(); ClassDay.Топ_Omron(TopLine6, now.AddDays(-1).ToString("yyyy-MM-dd"), now.ToString("yyyy-MM-dd"), "20:00:00", "08:00:00", ModelLabel6.Text);
                }
                else if (Status6.Text == "Oracle")
                {
                    Vypysk6Oracle(); Otkaz6Oracle(); FPY6(); ClassDay.ТопОшибокSMTНОЧЬ(TopLine6, DateTime.Now.AddDays(-1).ToString("dd.MM.yyyy"), DateTime.Now.AddDays(0).ToString("dd.MM.yyyy"), "18:00:00", "06:00:00", ModelLabel6.Text, LabelLine6.Text);
                }

                if (Status7.Text == "-")
                {
                    SMTGroup7.Visible = false;
                }
                else if (Status7.Text == "Omron")
                {
                    Vyp7Omron(); Otkaz7Omron(); FPY7(); ClassDay.Топ_Omron(TopLine7, now.AddDays(-1).ToString("yyyy-MM-dd"), now.ToString("yyyy-MM-dd"), "20:00:00", "08:00:00", ModelLabel7.Text);
                }
                else if (Status7.Text == "Oracle")
                {
                    Vypysk7Oracle(); Otkaz7Oracle(); FPY7(); ClassDay.ТопОшибокSMTНОЧЬ(TopLine7, DateTime.Now.AddDays(-1).ToString("dd.MM.yyyy"), DateTime.Now.AddDays(0).ToString("dd.MM.yyyy"), "18:00:00", "06:00:00", ModelLabel7.Text, LabelLine7.Text);
                }

                cells(Cell1, ModelLabel1.Text);
                cells(Cel2, ModelLabel2.Text);
                cells(Cel3, ModelLabel3.Text);
                cells(Cel4, ModelLabel4.Text);
                cells(Cel5, ModelLabel5.Text);
                cells(Cel6, ModelLabel6.Text);
                cells(Cel7, ModelLabel7.Text);

                //MessageBox.Show(Convert.ToString(Convert.ToDouble(Cell1.Text)));
                FPYColor1();
                FPYColor2();
                FPYColor3();
                FPYColor4();
                FPYColor5();
                FPYColor6();
                FPYColor7();

                //ClassDay.ТопОшибокSMTНочь(TopLine1, now.ToString("dd.MM.yyyy"), "18:00:00", "06:00;00", ModelLabel1.Text, LabelLine1.Text);
            }
            catch (Exception)
            {
                StatusLabel();
            }
        }