Beispiel #1
0
 void timer1_Tick(object sender, EventArgs e)
 {
     if (status != 1 || status == 2)
     {
         return;
     }
     timer1.Stop();
     entity1 = new AndonAlertEntity()
     {
         ANDON_ALERT_CONTENT = afterandonBtntext,
         ANDON_ALERT_TIME    = DateTime.Now,
         ANDON_TYPE_CODE     = "A",
         ANSWER_FLAG         = "N",
         COMPANY_CODE        = LoginInfo.CompanyInfo.COMPANY_CODE,
         EMPLOYEE_CODE       = LoginInfo.UserInfo.USER_ID,
         LOCATION_CODE       = LoginInfo.StationInfo.RMES_ID,
         PLINE_CODE          = LoginInfo.ProductLineInfo.RMES_ID,
         REPORT_FLAG         = "Y",
         STOP_FLAG           = "1",
         TEAM_CODE           = LoginInfo.TeamInfo.TEAM_CODE
     };
     AndonFactory.SaveAndonAlert(entity1);
     btnAndon.Text      = afterandonBtntext;
     btnAndon.BackColor = Color.MediumVioletRed;
     status             = 2;
     //throw new NotImplementedException();
 }
Beispiel #2
0
        private void btnAndon_Click(object sender, EventArgs e)
        {
            switch (status)
            {
            case 0:     // normal status
                int menuheight = ctmenuAndon.Height;
                ctmenuAndon.Width = btnAndon.Width;
                ctmenuAndon.Show(btnAndon, new Point(0, 0));
                break;

            case 1:     // prepare andon call, can be canceled
                timer1.Stop();
                status             = 0;
                entity1            = null;
                btnAndon.Text      = currentBtnText;
                btnAndon.BackColor = SystemColors.Control;
                label1.Visible     = false;
                break;

            case 2:     // calling, can be canceled, but it should be canceld by others who has the privilage.
                timer1.Stop();
                status = 0;
                entity1.ANSWER_FLAG       = "Y";
                entity1.ANDON_ANSWER_TIME = DateTime.Now;
                entity1.REPORT_FLAG       = "N";
                entity1.MATERIAL_CODE     = "-1";
                AndonFactory.SaveAndonAlert(entity1);
                entity1            = null;
                btnAndon.BackColor = SystemColors.Control;
                btnAndon.Text      = currentBtnText;
                label1.Visible     = false;
                break;

            default:
                status = 0;
                timer1.Stop();
                entity1 = null;
                break;
            }
        }
Beispiel #3
0
 public int Update(AndonAlertEntity en)
 {
     return(db.Update(en));
 }
Beispiel #4
0
 public static int Update(AndonAlertEntity en)
 {
     return(new AndonAlertDal().Update(en));
 }
Beispiel #5
0
 public static void SaveAndonAlert(AndonAlertEntity entity1)
 {
     new AndonDal().SaveAndonAlert(entity1);
 }
Beispiel #6
0
 public void SaveAndonAlert(AndonAlertEntity ent1)
 {
     db.Save(ent1);
 }
Beispiel #7
0
 public LedProcFactory(AndonAlertEntity AEntity)
 {
     AlertEntity = AEntity;
 }
Beispiel #8
0
 public BroadCastFactory(AndonAlertEntity AEntity)
 {
     AndonEntity = AEntity;
 }