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(); }
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"); } }