Esempio n. 1
0
        public ActionResult UpdateWareHouse(ResponseAdminWareHouseList item1, RequestAdminWareHouse item2, ResponseAdminWareHouseDetail item3, ResponseAdminWareHouse item4)
        {
            if (ModelState.IsValid)
            {
                LogicAdminWareHouse    adm      = new LogicAdminWareHouse();
                ResponseAdminWareHouse response = new ResponseAdminWareHouse();

                item2.flag         = 'M';
                item2.dateUpdate   = DateTime.Now;
                item2.userUpdate   = Session["user"].ToString();
                item2.userRegister = "";
                response           = adm.setWareHouse(item2);

                if (response.code == 50000)
                {
                    Session.Add("msgOk", response.message);
                }
                else
                {
                    Session.Add("msgEr", response.message);
                }
            }

            return(RedirectToAction("WareHouse"));
        }
Esempio n. 2
0
        public ActionResult addWareHouse(ResponseAdminWareHouseList item1, RequestAdminWareHouse item2,
                                         ResponseAdminWareHouseDetail item3, ResponseAdminWareHouse item4)
        {
            // Método para agregar opciones de catálogo
            if (ModelState.IsValid)
            {
                LogicAdminWareHouse adm = new LogicAdminWareHouse();

                item2.stateRecord  = true;
                item2.flag         = 'N';
                item2.dateRegister = DateTime.Now;
                item2.userRegister = Session["user"].ToString();
                item2.dateUpdate   = DateTime.Now;
                item2.userUpdate   = Session["user"].ToString();
                item4 = adm.setWareHouse(item2);

                if (item4.code == 50000)
                {
                    Session.Add("msgOk", item4.message);
                }
                else
                {
                    Session.Add("msgEr", item4.message);
                }
            }

            Tuple <ResponseAdminWareHouseList, RequestAdminWareHouse, ResponseAdminWareHouseDetail, ResponseAdminWareHouse> response =
                new Tuple <ResponseAdminWareHouseList, RequestAdminWareHouse, ResponseAdminWareHouseDetail, ResponseAdminWareHouse>(item1, item2, item3, item4);

            return(RedirectToAction("WareHouse"));
        }