private void button2_Click(object sender, EventArgs e)
        {
            var brak = new ProductionForm();

            brak.Show();
            Close();
        }
示例#2
0
 private void barButtonItemAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     using (ProductionForm addForm = new ProductionForm())
     {
         addForm.ShowDialog();
         addForm.Dispose();
     }
     loadData();
 }
示例#3
0
        private void barButtonItemView_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            ProductionForm viewForm = new ProductionForm();

            viewForm.currentProductionGuid = (Guid)productionGridView.GetFocusedRowCellValue("GUID");
            viewForm.edit = true;
            viewForm.view = true;
            viewForm.ShowDialog();
        }
示例#4
0
 private void barButtonItemEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     using (ProductionForm editForm = new ProductionForm())
     {
         editForm.currentProductionGuid = (Guid)productionGridView.GetFocusedRowCellValue("GUID");
         editForm.edit = true;
         editForm.ShowDialog();
     }
     loadData();
 }
        private void button1_Click(object sender, EventArgs e)
        {
            var indexW = Convert.ToInt32(comboBox1.SelectedValue.ToString());
            var indext = Convert.ToInt32(comboBox3.SelectedValue.ToString());

            dataBase.ProductUpd(indexW, indext, textBox1.Text, Convert.ToInt32(comboBox2.Text), _id);
            var brak = new ProductionForm();

            brak.Show();
            Close();
        }
        public void AddProduction(ProductionForm Form)
        {
            // Get product matching the superkey (MainTypeId, Measurements)
            Product Product = _context.Product.Where(p =>
                                                     p.MainTypeId == Form.MainTypeId &&
                                                     p.Measurements == Form.Measurements
                                                     ).OrderBy(p => p.ProductId).FirstOrDefault();

            // får se hvordan department håndteres etter hvert, dette er bare midlertidig
            Department Department = _context.Department.OrderBy(d => d.DepartmentId).FirstOrDefault();

            if (Department == null)
            {
                Department = new Department();
                Department.DepartmentId = 0;
                Department.Name         = "Beisfjord";
            }

            Production Production = new Production();

            Production.Product                 = Product;
            Production.MachineNumber           = Form.MachineNumber;
            Production.Operator                = Form.Operator;
            Production.Date                    = Form.Date;
            Production.TypeTested              = Form.TypeTested;
            Production.Department              = Department;
            Production.DailyControl            = new DailyControl();
            Production.DailyControl.IsApproved = false;
            // ?
            Production.DailyControl.ControlDate = DateTime.Now;
            //Production.DailyControl.ApprovedDate = DateTime.Now;
            Production.DailyControl.VisualControlDate = DateTime.Now;

            _context.Add(Production);
            _context.SaveChanges();
        }
 public GetProductQuantity(IMSApiSessionContextStruct sessionContext, ProductionForm view)
 {
     this.sessionContext = sessionContext;
     this.view           = view;
 }
示例#8
0
 public CommonFunction(IMSApiSessionContextStruct sessionContext, ProductionForm view)
 {
     this.sessionContext = sessionContext;
     this.view1          = view;
 }
示例#9
0
 public SocketClientHandler(ProductionForm view)
 {
     this.view = view;
 }
示例#10
0
 public GetCurrentWorkorder(IMSApiSessionContextStruct sessionContext, ProductionForm view)
 {
     this.sessionContext = sessionContext;
     this.view           = view;
 }
示例#11
0
        private void продукцияToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ProductionForm frm = new ProductionForm(deletion_allowed);

            frm.ShowDialog();
        }
示例#12
0
        private void продуктToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var brakForm = new ProductionForm();

            brakForm.Show();
        }
 public StatusCodeResult Post(ProductionForm Form)
 {
     Console.WriteLine("adding - ctrl");
     _repository.AddProduction(Form);
     return(Ok());
 }