public ActionResult NonRedeeming() { var userDetails = (CustomerLoginDetail)Session["UserSession"]; NonRedemptionCls objNonRedemptionCls = new NonRedemptionCls(); objNonRedemptionCls = KR.GetNonRedemptionData(userDetails.GroupId, userDetails.connectionString); return(View(objNonRedemptionCls)); }
public object NonRedeeming(string GroupId) { if (User.Identity.IsAuthenticated) { string connectionString = CR.GetCustomerConnString(GroupId); NonRedemptionCls objNonRedemptionCls = new NonRedemptionCls(); objNonRedemptionCls = KR.GetNonRedemptionData(GroupId, connectionString); return(new { Data = objNonRedemptionCls, MaxJsonLength = Int32.MaxValue }); } return("Invalid Token or Expired"); }
public NonRedemptionCls GetNonRedemptionData(string GroupId, string connstr) { NonRedemptionCls objNonRedemption = new NonRedemptionCls(); try { using (var context = new BOTSDBContext(connstr)) { objNonRedemption = context.Database.SqlQuery <NonRedemptionCls>("sp_BOTS_NonRedeeming @pi_GroupId, @pi_Date, @pi_LoginId", new SqlParameter("@pi_GroupId", GroupId), new SqlParameter("@pi_Date", DateTime.Now.ToShortDateString()), new SqlParameter("@pi_LoginId", "")).FirstOrDefault <NonRedemptionCls>(); } } catch (Exception ex) { newexception.AddException(ex, GroupId); } return(objNonRedemption); }