예제 #1
0
        /// <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();
        }
예제 #2
0
        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());
        }
예제 #3
0
        public ActionResult Delete(int id)
        {
            Batchs cc = _db.Batchs.Find(id);

            if (cc != null)
            {
                _db.Batchs.Remove(cc);
                _db.SaveChanges();
            }
            return(RedirectToAction("Index"));
        }
예제 #4
0
 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);
 }
예제 #5
0
        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();
        }
예제 #6
0
        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);
        }
예제 #7
0
        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));
                }
            }
        }
예제 #8
0
        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();
        }
예제 #10
0
 public bool DeleteBatchs(int id, Batchs bt)     // made by me
 {
     return(batchrepor.Delete(id, bt));
 }
예제 #11
0
 public bool UpdateBatchs(int id, Batchs bt)     // made by me
 {
     return(batchrepor.Update(id, bt));
 }
예제 #12
0
 public bool CreateBatch(Batchs bt)
 {
     return(batchrepor.Create(bt));
 }
예제 #13
0
        public Batchs GetElementById()
        {
            Batchs item = new Batchs();

            return(item);
        }
예제 #14
0
 public void Add(Batchs batch)
 {
     AppdbContext.Batchs.Add(batch);
     AppdbContext.SaveChanges();
 }
예제 #15
0
        public ActionResult Update(int id)
        {
            Batchs cc = _db.Batchs.Find(id);

            return(View(cc));
        }
예제 #16
0
 private Batchs SetEntityToTextBoxsBatchs(Batchs batch)
 {
     return(batch);
 }