Exemple #1
0
        // Inserts y Updates

        public JsonResult SaveConsecutive(BLL.Consecutivo consecutive)
        {
            consecutive.agregar_consecutivo();
            string message = "Success";

            return(Json(message, JsonRequestBehavior.AllowGet));
        }
Exemple #2
0
        public JsonResult UpdateConsecutive(BLL.Consecutivo consecutive)
        {
            consecutive.modifica_consecutivo();
            string message = "Success";

            return(Json(message, JsonRequestBehavior.AllowGet));
        }
Exemple #3
0
        // View Lista Consecutivos
        public ActionResult ConsecutiveList(BLL.Consecutivo consecutivo)
        {
            List <ConsecutiveModel> list = new List <ConsecutiveModel>();
            DataSet dataSet = new DataSet();

            dataSet = consecutivo.lista_consecutivos();
            foreach (DataRow row in dataSet.Tables[0].Rows)
            {
                list.Add(new ConsecutiveModel
                {
                    Codigo         = Convert.ToInt32(row["Codigo"]),
                    ID_Consecutivo = row["ID_Consecutivo"].ToString(),
                    Descripcion    = row["Descripcion"].ToString(),
                    Prefijo        = row["Prefijo"].ToString(),
                    Rango_Inicial  = Convert.ToInt32(row["Rango_inicial"]),
                    Rango_Final    = Convert.ToInt32(row["Rango_final"])
                });
            }
            return(View(list));
        }