示例#1
0
        public ActionResult Edit(int id, FormCollection form)
        {
            #region Added by shakir (Currency parameter)
            var selectCurrency = (dynamic)null;
            if (form["selectCurrency"] != null)
            {
                selectCurrency = Convert.ToInt32(form["selectCurrency"].ToString());
            }
            else
            {
                selectCurrency = Convert.ToInt32(Session["SelectedCurrency"].ToString());
            }

            UtilityClass.GetSelectedCurrecy(selectCurrency);
            #endregion


            ServiceRepository   serviceObj = new ServiceRepository();
            HttpResponseMessage response   = serviceObj.GetResponse("/api/BlotterRECON/GetBlotterRECON?id=" + id.ToString());
            response.EnsureSuccessStatusCode();
            Models.SBP_BlotterRECON BlotterRECON = response.Content.ReadAsAsync <Models.SBP_BlotterRECON>().Result;
            UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(BlotterRECON), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString());
            ViewBag.nostobankid      = BlotterRECON.NostroBankId;
            ViewBag.RECONNostroBanks = GetAllNostroBanks();
            return(PartialView("_Edit", BlotterRECON));
        }
示例#2
0
        public JsonResult <Models.SBP_BlotterRECON> GetblotterRECON(int id)
        {
            EntitiyMapperBlotterRECON <DataAccessLayer.SBP_BlotterRECON, Models.SBP_BlotterRECON> mapObj = new EntitiyMapperBlotterRECON <DataAccessLayer.SBP_BlotterRECON, Models.SBP_BlotterRECON>();

            DataAccessLayer.SBP_BlotterRECON dalblotterRECON = DAL.GetRECONItem(id);
            Models.SBP_BlotterRECON          products        = new Models.SBP_BlotterRECON();
            products = mapObj.Translate(dalblotterRECON);
            return(Json <Models.SBP_BlotterRECON>(products));
        }
示例#3
0
        public bool UpdateRECON(Models.SBP_BlotterRECON blotterRECON)
        {
            bool status = false;

            if (ModelState.IsValid)
            {
                EntitiyMapperBlotterRECON <Models.SBP_BlotterRECON, DataAccessLayer.SBP_BlotterRECON> mapObj = new EntitiyMapperBlotterRECON <Models.SBP_BlotterRECON, DataAccessLayer.SBP_BlotterRECON>();
                DataAccessLayer.SBP_BlotterRECON RECONObj = new DataAccessLayer.SBP_BlotterRECON();
                RECONObj = mapObj.Translate(blotterRECON);
                status   = DAL.UpdateRECON(RECONObj);
            }
            return(status);
        }
示例#4
0
        public ActionResult Update(Models.SBP_BlotterRECON BlotterRECON, FormCollection form)
        {
            BlotterRECON.UserID       = Convert.ToInt16(Session["UserID"].ToString());
            BlotterRECON.BID          = Convert.ToInt16(Session["BranchID"].ToString());
            BlotterRECON.BR           = Convert.ToInt16(Session["BR"].ToString());
            BlotterRECON.CurID        = Convert.ToInt16(Session["SelectedCurrency"].ToString());
            BlotterRECON.UpdateDate   = DateTime.Now;
            BlotterRECON.NostroBankId = Convert.ToInt32(form["NostroBankId"].ToString());
            ServiceRepository   serviceObj = new ServiceRepository();
            HttpResponseMessage response   = serviceObj.PutResponse("api/BlotterRECON/UpdateRECON", BlotterRECON);

            response.EnsureSuccessStatusCode();
            UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(BlotterRECON), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString());
            return(RedirectToAction("BlotterRECON"));
        }