Esempio n. 1
0
 private void StokListele()
 {
     using (ARAFEntities context = new ARAFEntities())
     {
         if (WORK_ORDER_TYPE_ == 0)
         {
             var Prd = from h in context.ARF_PLANNING_WORKSTATION_ITEMS
                       where h.WS_ID == MakineID
                       select new { h.ITEM_CODE, h.ITEM_NAME };
             if (Prd != null)
             {
                 gridControlStokListesi.DataSource = Prd.ToList();
             }
         }
         else
         {
             var Prd = from h in context.ARF_PLANNING_WORKSTATION_ITEMS
                       where h.WSG_ID == WSG_ID_
                       select new { h.ITEM_CODE, h.ITEM_NAME };
             if (Prd != null)
             {
                 gridControlStokListesi.DataSource = Prd.ToList();
             }
         }
     }
 }
Esempio n. 2
0
 private void IsListele(string ITEM_CODE_)
 {
     using (ARAFEntities context = new ARAFEntities())
     {
         if (WORK_ORDER_TYPE_ == 0)
         {
             var Prd = from h in context.ARF_PLANNING
                       where h.WS_ID == MakineID && h.PLAN_STATUS != 2 && h.ITEM_CODE == ITEM_CODE_
                       select h;
             if (Prd != null)
             {
                 gridControlIsListesi.DataSource = Prd.ToList();
             }
         }
         else
         {
             var Prd = from h in context.ARF_PLANNING
                       where h.WSG_ID == WSG_ID_ && h.PLAN_STATUS != 2 && h.ITEM_CODE == ITEM_CODE_
                       select h;
             if (Prd != null)
             {
                 gridControlIsListesi.DataSource = Prd.ToList();
             }
         }
     }
 }
Esempio n. 3
0
        private void simpleButtonseciliIsiBaslat_Click(object sender, EventArgs e)
        {
            int PLAN_ID_ = Convert.ToInt32(gridViewPlanListe.GetRowCellValue(gridViewPlanListe.FocusedRowHandle, "PLAN_ID").ToString());

            using (ARAFEntities context = new ARAFEntities())
            {
                var query1 = from contact in context.ARF_TMP_PLANNING
                             where
                             contact.WS_ID == MakineID
                             select contact;

                // Iterate through the collection of Contact items.
                foreach (var result1 in query1)
                {
                    uretimPlanEkle(result1.PLAN_ID, result1.WS_ID);
                }
                UretimEkle(MakineID);


                if (PlanEkle_ == 0)
                {
                    var query = (from contact1 in context.PRODUCTION_PLANNING
                                 where contact1.WS_ID == MakineID && contact1.PLAN_ID == PLAN_ID_ && contact1.PROD_PLAN_STATUS == 0
                                 select contact1).First();
                    query.PROD_PLAN_STATUS = 1;
                    context.SaveChanges();
                }
            }


            simpleButtonKapat_Click(sender, e);
        }
Esempio n. 4
0
        public void uretimPlanEkle(int PLAN_ID, int WS_ID)
        {
            int dd;

            using (ARAFEntities context = new ARAFEntities())
            {
                dd = Convert.ToInt32(context.ARF_PRODUCTION_PLANNIG_INSERT(PLAN_ID, WS_ID).ToString());
            }
        }
Esempio n. 5
0
        public void UretimBitir(int _PROD_ID_, int _WS_ID)
        {
            int dd;

            using (ARAFEntities context = new ARAFEntities())
            {
                dd = Convert.ToInt32(context.ARF_PRODUCTION_STOPP(_PROD_ID_, _WS_ID).ToString());
            }
        }
Esempio n. 6
0
        public void UretimEkle(int WS_ID)
        {
            int dd;

            using (ARAFEntities context = new ARAFEntities())
            {
                dd = Convert.ToInt32(context.ARF_PRODUCTION_START(WS_ID).ToString());
            }
        }
Esempio n. 7
0
 private void EklenenPlanListesi()
 {
     using (ARAFEntities context = new ARAFEntities())
     {
         var Prd = from h in context.ARF_TMP_PLANNING where h.WS_ID == MakineID select h;
         if (Prd != null)
         {
             gridControlPlanListe.DataSource = Prd.ToList();
         }
     }
 }
Esempio n. 8
0
 private void Listele()
 {
     using (ARAFEntities context = new ARAFEntities())
     {
         var Prd = from h in context.ARF_PRODUCTION_OPERATOR where h.PRD_WS_ID == MakineID && h.PRD_STATUS == 0 select new { h.PRD_OPR_ID, h.OPR_NAME, h.WS_CODE, h.WS_NAME, h.COMPUTER_NAME };
         if (Prd != null)
         {
             gridControlUretimOperator.DataSource = Prd.ToList();
         }
     }
 }
Esempio n. 9
0
 private void Listele()
 {
     using (ARAFEntities context = new ARAFEntities())
     {
         var Prd = from h in context.ARF_OPERATOR_PANEL where h.WS_ID == MakineID select h;
         if (Prd != null)
         {
             gridControlIslistesi.DataSource = Prd.ToList();
         }
     }
 }
Esempio n. 10
0
 private void Listele()
 {
     using (ARAFEntities context = new ARAFEntities())
     {
         var Prd = from h in context.SHIFT select h;
         if (Prd != null)
         {
             gridControlVardiyaListesi.DataSource = Prd.ToList();
         }
     }
 }
Esempio n. 11
0
        private void Silme()
        {
            int ID = Convert.ToInt32(gridViewPlanListe.GetRowCellValue(gridViewPlanListe.FocusedRowHandle, "TMP_PLN_ID").ToString());

            using (ARAFEntities context = new ARAFEntities())
            {
                context.TMP_PLANNING.RemoveRange(context.TMP_PLANNING.Where(u => u.TMP_PLN_ID == ID));
                context.SaveChanges();
            }
            EklenenPlanListesi();
        }
Esempio n. 12
0
 private void PlanDurumuListe()
 {
     using (ARAFEntities context = new ARAFEntities())
     {
         var Prd = from h in context.ARF_PLANNING_STATUS select h;
         if (Prd != null)
         {
             //   gridControlPlanDurumu.DataSource = Prd.ToList();
         }
     }
 }
Esempio n. 13
0
 private void PlandakiIsler(int WSID_)
 {
     using (ARAFEntities context = new ARAFEntities())
     {
         var Prd = from h in context.ARF_OPERATOR_PANEL where h.WS_ID == MakineID && h.PLAN_STATUS != 2 && h.WS_ID == WSID_ && h.PROD_PLAN_STATUS == 0 select new { h.PLAN_ID, h.WORK_ORDER_NO, h.OP_NAME, h.PLAN_DATE, h.ITEM_CODE, h.ITEM_NAME, h.CUSTOMER_NAME, h.WORK_ORDER_QUANTITY };
         if (Prd != null)
         {
             gridControlPlandakiIsler.DataSource = Prd.ToList();
         }
     }
 }
Esempio n. 14
0
        private void Kaydet()
        {
            ARAFEntities db   = new ARAFEntities();
            TMP_PLANNING tmpP = new TMP_PLANNING();

            tmpP.WS_ID      = MakineID;
            tmpP.PLAN_ID    = Convert.ToInt32(gridViewIsListesi.GetRowCellValue(gridViewIsListesi.FocusedRowHandle, "PLAN_ID").ToString());
            tmpP.MULTIPLIER = 1;
            tmpP.DIVIDING   = 1;
            db.TMP_PLANNING.Add(tmpP);
            db.SaveChanges();
            EklenenPlanListesi();
        }
Esempio n. 15
0
        private void Kaydet()
        {
            ARAFEntities        db  = new ARAFEntities();
            PRODUCTION_OPERATOR opr = new PRODUCTION_OPERATOR();

            opr.PROD_ID    = ProductionID;
            opr.OPR_ID     = OperatorID_;
            opr.ROT_ID     = 1;
            opr.PRD_WS_ID  = MakineID;
            opr.PRD_STATUS = 0;
            opr.SHIFT_ID   = Convert.ToInt32(edtVardiya.EditValue.ToString());
            db.PRODUCTION_OPERATOR.Add(opr);
            db.SaveChanges();
            Listele();
        }
Esempio n. 16
0
        private void DurusBaslat()
        {
            ARAFEntities       db = new ARAFEntities();
            PRODUCTION_SUSPEND PS = new PRODUCTION_SUSPEND();

            PS.PROD_ID            = ProductionID;
            PS.OPR_ID             = 0;
            PS.SUSPEND_ID         = Convert.ToInt32(textEditDurus_Adi.Tag.ToString());
            PS.SUSPEND_START_TIME = DateTime.Now;
            PS.SUSPEND_STATUS     = 1;
            PS.COMMENT            = textEditAciklama.Text;
            db.PRODUCTION_SUSPEND.Add(PS);
            db.SaveChanges();
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
Esempio n. 17
0
        private void simpleButtonPlanEkle_Click(object sender, EventArgs e)
        {
            int ID = Convert.ToInt32(gridViewIsListesi.GetRowCellValue(gridViewIsListesi.FocusedRowHandle, "PLAN_ID").ToString());

            using (ARAFEntities context = new ARAFEntities())
            {
                var Prd = from h in context.ARF_TMP_PLANNING where h.WS_ID == MakineID && h.PLAN_ID == ID select h;
                if ((Prd != null) && (Prd.Count() != 0))
                {
                    MessageBox.Show("Plan Eklenmiş.");
                }
                else
                {
                    Kaydet();
                }
            }
        }
Esempio n. 18
0
        private void ChardDoldur()
        {
            int       i       = 0;
            XYDiagram diagram = (XYDiagram)chartControlDuruslar.Diagram;

            using (ARAFEntities context = new ARAFEntities())
            {
                var query = from contact in context.ARF_PRODUCTION_SUSPEND
                            where
                            contact.PROD_ID == ProductionID
                            orderby contact.SUSPEND_TIME
                            select contact;

                // Iterate through the collection of Contact items.
                foreach (var result in query)
                {
                    this.chartControlDuruslar.Titles.Clear(); //Chart da varsayılan olarak gelen başlıkları temizliyoruz.
                    this.chartControlDuruslar.Series.Clear(); //Chart da varsayılan olarak gelen series (Liste) temizliyoruz.


                    // Add two custom labels to the X-axis' collection.
                    diagram.AxisX.CustomLabels.Add(new CustomAxisLabel(result.SUSPEND_NAME.ToString()));
                    diagram.AxisX.CustomLabels[i].AxisValue = result.SUSPEND_NAME.ToString();
                    diagram.AxisX.Title.Text      = "";
                    diagram.AxisX.Label.TextColor = Color.Red;
                    // diagram.AxisX.Label.Visible = true;
                    diagram.AxisX.Visibility = DevExpress.Utils.DefaultBoolean.True;
                    Series series1 = new Series("DURUŞ ADI", ViewType.Bar);
                    chartControlDuruslar.Series.Add(series1);
                    series1.DataSource         = query.ToList();
                    series1.ArgumentScaleType  = ScaleType.Qualitative;
                    series1.ArgumentDataMember = "SUSPEND_NAME";
                    series1.ValueScaleType     = ScaleType.Numerical;
                    SideBySideBarSeriesView view = series1.View as SideBySideBarSeriesView;
                    view.BarWidth = 0.1;

                    series1.LabelsVisibility = DevExpress.Utils.DefaultBoolean.True;

                    chartControlDuruslar.Legend.Visibility = DevExpress.Utils.DefaultBoolean.True;

                    series1.ValueDataMembers.AddRange(new string[] { "SUSPEND_TIME" });
                    //((pie)chartControl2.Diagram).AxisY.Visible = false;
                    i++;
                }
            }
        }
Esempio n. 19
0
        private void simpleButtonTumunuBaslat_Click(object sender, EventArgs e)
        {
            using (ARAFEntities context = new ARAFEntities())
            {
                var query1 = from contact in context.ARF_TMP_PLANNING
                             where
                             contact.WS_ID == MakineID
                             select contact;

                // Iterate through the collection of Contact items.
                foreach (var result1 in query1)
                {
                    uretimPlanEkle(result1.PLAN_ID, result1.WS_ID);
                }
                UretimEkle(MakineID);
            }
            simpleButtonKapat_Click(sender, e);
        }
Esempio n. 20
0
 private void ArafFrmDurusInsert_Load(object sender, EventArgs e)
 {
     WorkStationPanel.Buttons.Clear();
     using (ARAFEntities context = new ARAFEntities())
     {
         var query = from contact in context.ARF_SUSPEND_WORKSTATION
                     where
                     contact.WS_ID == MakineID orderby contact.BUTTON_QUEUE
                     select contact;
         foreach (var result1 in query)
         {
             customBackButton         = new DevExpress.XtraBars.Docking2010.WindowsUIButton();
             customBackButton.Caption = result1.SUSPEND_NAME;
             customBackButton.Tag     = result1.SUSPEND_ID;
             WorkStationPanel.Buttons.Add(customBackButton);
         }
     }
 }
Esempio n. 21
0
        public int WORK_ORDER_TYPE(int WS_ID)
        {
            int sonuc = 0;

            using (ARAFEntities context = new ARAFEntities())
            {
                var query = from contact in context.WORKSTATION
                            where
                            contact.WS_ID == WS_ID
                            select contact;

                // Iterate through the collection of Contact items.
                foreach (var result in query)
                {
                    sonuc = Convert.ToInt32(result.WORK_ORDER_TYPE);
                }
            }
            return(sonuc);
        }
Esempio n. 22
0
 private void btnSil_ItemClick(object sender, ItemClickEventArgs e)
 {
     if (gridViewUretimOperator.RowCount != 0)
     {
         int PO_ID = Convert.ToInt32(gridViewUretimOperator.GetRowCellValue(gridViewUretimOperator.FocusedRowHandle, "PRD_OPR_ID").ToString());
         using (ARAFEntities Context = new ARAFEntities())
         {
             PRODUCTION_OPERATOR po = new PRODUCTION_OPERATOR {
                 PRD_OPR_ID = PO_ID
             };
             Context.Entry(po).State = EntityState.Deleted;
             Context.SaveChanges();
         }
         Listele();
     }
     else
     {
         MessageBox.Show("Silinecek Kayıt Yok");
     }
 }
Esempio n. 23
0
        private void simpleButtonPlandakiIsiBaslat_Click(object sender, EventArgs e)
        {
            int PLAN_ID_ = Convert.ToInt32(gridViewPlandakiIsler.GetRowCellValue(gridViewPlandakiIsler.FocusedRowHandle, "PLAN_ID").ToString());

            using (ARAFEntities context = new ARAFEntities())
            {
                if (ProductionID != 0) //Üretim var ise mevcut üretimi bitirmektedir. Yeni üretim başlatmaktadır.
                {
                    var query1 = (from contact1 in context.PRODUCTION_PLANNING
                                  where contact1.WS_ID == MakineID && contact1.PROD_PLAN_STATUS == 1
                                  select contact1).First();
                    query1.PROD_PLAN_STATUS = 2;
                    context.SaveChanges();
                }
                var query = (from contact1 in context.PRODUCTION_PLANNING
                             where contact1.WS_ID == MakineID && contact1.PLAN_ID == PLAN_ID_ && contact1.PROD_PLAN_STATUS == 0
                             select contact1).First();
                query.PROD_PLAN_STATUS = 1;
                context.SaveChanges();
            }
            PlandakiIsler(MakineID);
        }
Esempio n. 24
0
        private void PanelTipiAyarla(int PanelTipi, DevExpress.XtraGrid.Views.Card.CardView cardTmp)
        {
            using (ARAFEntities context = new ARAFEntities())
            {
                RowLariGizle(cardTmp);
                var query = from contact in context.PANEL_TYPE_DETAIL
                            where
                            contact.ACTIVE == 1 && contact.PANEL_ID == PanelTipi
                            orderby contact.QUEUE
                            select contact;

                // Iterate through the collection of Contact items.
                foreach (var result in query)
                {
                    GridColumn column = new GridColumn();
                    column.FieldName = result.FIELD_NAME.ToString();
                    column.Caption   = result.FIELD_CAPTION.ToString();
                    column.Visible   = true;
                    cardTmp.Columns.Add(column);
                }
            }
        }
Esempio n. 25
0
        private void ÜretmBilgileri(int WSID_)
        {
            textEditMakineAdi.Text             = "";;
            textEditVardiyaAdi.Text            = "";
            textEditOperatorAdi.Text           = "";
            gridControlSiparis_urun.DataSource = null;
            gridControlMiktar.DataSource       = null;
            //    this.arcScaleComponentVerimlilik.Value = 0;
            ProductionID   = 0;
            SUSPEND_ACTIVE = 0;
            using (ARAFEntities context = new ARAFEntities())
            {
                var query = (from contact in context.ARF_OPERATOR_PANEL
                             where
                             contact.WS_ID == WSID_ && contact.PROD_PLAN_STATUS == 1 orderby contact.PROD_PLAN_ID
                             select contact);
                foreach (var result in query)
                {
                    textEditVardiyaAdi.Text            = result.SHIFT_CODE.ToString();
                    textEditMakineAdi.Text             = result.WS_NAME.ToString();
                    textEditOperatorAdi.Text           = result.OPR_NAME.ToString();
                    ProductionID                       = Convert.ToInt32(result.PROD_ID.ToString());
                    gridControlSiparis_urun.DataSource = query.ToList();
                    gridControlMiktar.DataSource       = query.ToList();
                    SUSPEND_ACTIVE                     = result.ACTIVE_SUSPEND_TIME;


                    //      this.arcScaleComponentVerimlilik.Value = Convert.ToSingle(result.PRODUCTIVITY.ToString());
                    if (result.PRODUCTION_STATUS.ToString() != "URETIM")
                    {
                        ribbonPage1.Appearance.BackColor = System.Drawing.ColorTranslator.FromHtml(result.COLOR.ToString());
                    }
                    else
                    {
                        ribbonPage1.Appearance.BackColor = Color.Transparent;
                    }
                }
            }
        }
Esempio n. 26
0
        private void textEdit1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyValue == 13)
            {
                using (ARAFEntities context = new ARAFEntities())
                {
                    var query11 = from contact in context.OPERATOR
                                  where
                                  contact.OPR_BARCODE == txtBarkodNo.Text
                                  select contact;

                    // Iterate through the collection of Contact items.
                    foreach (var r in query11)
                    {
                        OperatorID_       = r.OPR_ID;
                        edtAdiSoyAdi.Text = r.OPR_NAME;
                    }
                    var Sections = from s in context.SHIFT

                                   orderby s.SHIFT_ID
                                   select new
                    {
                        SHIFT_ID   = s.SHIFT_ID,
                        SHIFT_CODE = s.SHIFT_CODE
                    };

                    edtVardiya.Properties.DataSource    = Sections.ToArray();
                    edtVardiya.Properties.DisplayMember = "SHIFT_CODE";
                    edtVardiya.Properties.ValueMember   = "SHIFT_ID";
                    edtVardiya.EditValue = 1;
                    edtVardiya.Properties.ForceInitialize();
                    Kaydet();
                    foreach (var process in Process.GetProcessesByName("osk"))
                    {
                        process.Kill();
                    }
                }
            }
        }
Esempio n. 27
0
        private void RibbonForm1_Load(object sender, EventArgs e)
        {
            WorkStationPanel.Buttons.Clear();
            using (ARAFEntities context = new ARAFEntities())
            {
                string LastName = Environment.MachineName;
                var    query1   = from contact in context.WORKSTATION
                                  where
                                  contact.COMPUTER_NAME == LastName
                                  select contact;

                // Iterate through the collection of Contact items.
                foreach (var result1 in query1)
                {
                    customBackButton         = new DevExpress.XtraBars.Docking2010.WindowsUIButton();
                    customBackButton.Caption = result1.WS_NAME;
                    customBackButton.Tag     = result1.WS_ID;
                    WorkStationPanel.Buttons.Add(customBackButton);
                }
            }

            df.RestoreLayout(gridViewPlandakiIsler, "gridViewPlandakiIsler_" + this.Name);
            widthRatio  = Screen.PrimaryScreen.Bounds.Width / 1024;
            heightRatio = Screen.PrimaryScreen.Bounds.Height / 768;
            SizeF scale = new SizeF(widthRatio, heightRatio);

            this.Scale(scale);
            foreach (Control control in this.Controls)
            {
                control.Font = new Font("Verdana", control.Font.SizeInPoints * heightRatio * widthRatio);
            }
            PanelTipiAyarla(1, cardViewSiparis_Urun);
            PanelTipiAyarla(2, cardViewMiktar);
            Makinebilgisi();
            PlandakiIsler(MakineID);

            ChardDoldur();
        }
Esempio n. 28
0
        private void barButtonItemDurus_Bitir_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (ProductionID == 0)
            {
                MessageBox.Show("Açık Üretim Yok. Duruş Bitirme İşlemi Yapamazsınız.");
                return;
            }
            if (SUSPEND_ACTIVE == 0)
            {
                MessageBox.Show("Açık Duruş Yok. Duruş Bitirme İşlemi Yapamazsınız.");
                return;
            }

            using (ARAFEntities context = new ARAFEntities())
            {
                var query1 = (from contact in context.PRODUCTION_SUSPEND
                              where
                              contact.PROD_ID == ProductionID && contact.SUSPEND_STATUS == 1
                              select contact).First();
                query1.SUSPEND_END_TIME = DateTime.Now;
                query1.SUSPEND_STATUS   = 0;
                context.SaveChanges();
            }
        }