/// <summary> /// Asigna el objeto principal al origen de datos /// <returns>void</returns> /// </summary> protected override void RefreshMainData() { Datos.DataSource = _entity; Batchs pes = _expediente.Partidas; ProductoProveedorList ppl = _proveedor.Productos; PgMng.Grow(); List <ProductoProveedorInfo> lista = new List <ProductoProveedorInfo>(); foreach (ProductoProveedorInfo ppi in ppl) { if (!(pes.ContainsProducto(ppi.OidProducto) && pes.ContainsProveedor(_proveedor.Oid))) { lista.Add(ppi); } } Datos_ProductoProveedor.DataSource = lista; PgMng.Grow(); AsignaPrecios(); PgMng.Grow(); }
public ActionResult Create(Batchs bt) { string error = string.Empty; if (ModelState.IsValid) { bool isSuccess = _serv.CreateBatch(bt); TempData["AlertCSS"] = isSuccess ? "alert success" : "alert error"; if (!isSuccess) { ModelState.AddModelError("", error); } else { TempData["OutputMessage"] = "Record Successfully Created"; } if (ModelState.IsValid) { return(RedirectToAction("Index")); } } return(View()); }
public ActionResult Delete(int id) { Batchs cc = _db.Batchs.Find(id); if (cc != null) { _db.Batchs.Remove(cc); _db.SaveChanges(); } return(RedirectToAction("Index")); }
public void EmptyContext() { Users.RemoveRange(Users); Vehicles.RemoveRange(Vehicles); Inspections.RemoveRange(Inspections); Batchs.RemoveRange(Batchs); Zones.RemoveRange(Zones); DamageRegistrys.RemoveRange(DamageRegistrys); VehicleMovements.RemoveRange(VehicleMovements); BatchTransports.RemoveRange(BatchTransports); RouteZones.RemoveRange(RouteZones); }
public void Update(Batchs batch) { var item = AppdbContext.Batchs.Find(batch.Id); if (item != null) { batch.BatchNumber = batch.BatchNumber; batch.DateOpen = batch.DateOpen; batch.Description = batch.Description; batch.Person = batch.Person; } ; AppdbContext.SaveChanges(); }
private Batchs CreateObjectBatch() { Batchs batch = new Batchs { BatchNumber = TXT_BAT_NUMERO.Text, DateOpen = Convert.ToDateTime(TXT_BAT_DATE.Text), DateClose = Convert.ToDateTime(TXT_BAT_DATE.Text), Person = TXT_BAT_PERSON.Text, BatchStatus = false, Description = TXT_BAT_DESCRIPTION.Text }; return(batch); }
public void Process() { bool ok = false; // Process each line foreach (string s in content.Split(SegmentTerminator, StringSplitOptions.RemoveEmptyEntries)) { if (!ok) { // Process only start after the file type has been identified switch (s.Substring(0, 4)) { case "FHS": Type = FileType.File; #region Process FHS segment if (s.Length < 10) { return; } EncodingCharacters.FieldSeparator = s[3]; #endregion break; case "BHS": Type = FileType.Batch; Segments.Add(new Segment(s)); ok = true; break; case "MSH": Type = FileType.Message; Batchs.Add(new Batch()); Batchs.Last().Messages.Add(new Message(s)); ok = true; break; default: // Proces segment Messages.Last().Segments.Add(new Segment(s)); break; } } else { Segments.Add(new Segment(s)); } } }
private void LINK_BAT_SEARCH_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { var listbatchs = batchcontroller.List(); SelecctionItems selectitems = new SelecctionItems { BannerTipoItems = "Lotes", Data = listbatchs }; selectitems.ShowDialog(); if (selectitems.ProcessTask == false) { return; } Batchs ReturnBatch = (Batchs)selectitems.EntityReturn; SetEntityToTextBoxsBatchs(ReturnBatch); }
private void Fetch(IDataReader source) { try { _base.CopyValues(source); if (Childs) { string query; IDataReader reader; query = Batch.SELECT(OidPartida); reader = nHManager.Instance.SQLNativeSelect(query, Session()); _batchs = Batchs.GetChildList(SessionCode, reader); } } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } MarkOld(); }
public bool DeleteBatchs(int id, Batchs bt) // made by me { return(batchrepor.Delete(id, bt)); }
public bool UpdateBatchs(int id, Batchs bt) // made by me { return(batchrepor.Update(id, bt)); }
public bool CreateBatch(Batchs bt) { return(batchrepor.Create(bt)); }
public Batchs GetElementById() { Batchs item = new Batchs(); return(item); }
public void Add(Batchs batch) { AppdbContext.Batchs.Add(batch); AppdbContext.SaveChanges(); }
public ActionResult Update(int id) { Batchs cc = _db.Batchs.Find(id); return(View(cc)); }
private Batchs SetEntityToTextBoxsBatchs(Batchs batch) { return(batch); }