Example #1
0
        public JsonResult <Models.SBP_BlotterCRRFINCON> GetBlotterCRRFINCON(int id)
        {
            EntitiyMapperBlotterCRRFINCON <DataAccessLayer.SBP_BlotterCRRFINCON, Models.SBP_BlotterCRRFINCON> mapObj = new EntitiyMapperBlotterCRRFINCON <DataAccessLayer.SBP_BlotterCRRFINCON, Models.SBP_BlotterCRRFINCON>();

            DataAccessLayer.SBP_BlotterCRRFINCON dalBlotterCRRFINCON = DAL.GetCRRFINCONItem(id);
            Models.SBP_BlotterCRRFINCON          products            = new Models.SBP_BlotterCRRFINCON();
            products = mapObj.Translate(dalBlotterCRRFINCON);
            return(Json <Models.SBP_BlotterCRRFINCON>(products));
        }
Example #2
0
        public bool UpdateCRRFINCON(Models.SBP_BlotterCRRFINCON blotterCRRFINCON)
        {
            bool status = false;

            if (ModelState.IsValid)
            {
                blotterCRRFINCON.DemandTimeLiablitiesTotal       = (blotterCRRFINCON.DemandTimeLiablities - blotterCRRFINCON.TimeLiablitiesOverOneYear);
                blotterCRRFINCON.DemandTimeLiablitiesTotalForCRR = (blotterCRRFINCON.DemandTimeLiablitiesTotal + blotterCRRFINCON.PreMatureDeposit);
                EntitiyMapperBlotterCRRFINCON <Models.SBP_BlotterCRRFINCON, DataAccessLayer.SBP_BlotterCRRFINCON> mapObj = new EntitiyMapperBlotterCRRFINCON <Models.SBP_BlotterCRRFINCON, DataAccessLayer.SBP_BlotterCRRFINCON>();
                DataAccessLayer.SBP_BlotterCRRFINCON CRRFINCONObj = new DataAccessLayer.SBP_BlotterCRRFINCON();
                CRRFINCONObj = mapObj.Translate(blotterCRRFINCON);
                status       = DAL.UpdateCRRFINCON(CRRFINCONObj);
            }
            return(status);
        }
        public ActionResult Update(Models.SBP_BlotterCRRFINCON BlotterCRRFINCON)
        {
            BlotterCRRFINCON.UserID     = Convert.ToInt16(Session["UserID"].ToString());
            BlotterCRRFINCON.BID        = Convert.ToInt16(Session["BranchID"].ToString());
            BlotterCRRFINCON.BR         = Convert.ToInt16(Session["BR"].ToString());
            BlotterCRRFINCON.CurID      = Convert.ToInt16(Session["SelectedCurrency"].ToString());
            BlotterCRRFINCON.UpdateDate = DateTime.Now;
            ServiceRepository   serviceObj = new ServiceRepository();
            HttpResponseMessage response   = serviceObj.PutResponse("api/BlotterCRRFINCON/UpdateCRRFINCON", BlotterCRRFINCON);

            response.EnsureSuccessStatusCode();
            //ViewData["SysCurrentDt"] = GetCurrentDT().ToString("dd-MMM-yyyy");
            //ViewData["BrCode"] = BrCode;
            UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(BlotterCRRFINCON), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString());
            return(RedirectToAction("BlotterCRRFINCON"));
        }
        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/BlotterCRRFINCON/GetBlotterCRRFINCON?id=" + id.ToString());
            response.EnsureSuccessStatusCode();
            Models.SBP_BlotterCRRFINCON BlotterCRRFINCON = response.Content.ReadAsAsync <Models.SBP_BlotterCRRFINCON>().Result;
            UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(BlotterCRRFINCON), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString());
            return(PartialView("_Edit", BlotterCRRFINCON));
        }