Exemplo n.º 1
0
        public JsonResult GetMemberMisinformationData()
        {
            var userDetails = (CustomerLoginDetail)Session["UserSession"];
            MembersInformation objMembersInformation = new MembersInformation();

            objMembersInformation = KR.GetMemberMisinformationData(userDetails.GroupId, userDetails.connectionString);
            return(new JsonResult()
            {
                Data = objMembersInformation, JsonRequestBehavior = JsonRequestBehavior.AllowGet, MaxJsonLength = Int32.MaxValue
            });
        }
        public MembersInformation GetMemberMisinformationData(string GroupId, string connstr)
        {
            MembersInformation objMembersInformation = new MembersInformation();

            try
            {
                using (var context = new BOTSDBContext(connstr))
                {
                    objMembersInformation = context.Database.SqlQuery <MembersInformation>("sp_BOTS_MemberInformation @pi_GroupId, @pi_Date, @pi_LoginId",
                                                                                           new SqlParameter("@pi_GroupId", GroupId),
                                                                                           new SqlParameter("@pi_Date", DateTime.Now.ToShortDateString()),
                                                                                           new SqlParameter("@pi_LoginId", "")).FirstOrDefault <MembersInformation>();
                }
            }
            catch (Exception ex)
            {
                newexception.AddException(ex, GroupId);
            }
            return(objMembersInformation);
        }