Exemplo n.º 1
0
        public string GetGridData(GridSettings grid)
        {
            try
            {
                using (var ctx = new BHGroupEntities())
                {
                    var query = ctx.DrowTokens.Include("Member").AsQueryable();

                    int count;
                    var data = query.GridCommonSettings(grid, out count);

                    var result = new
                    {
                        total = (int)Math.Ceiling((double)count / grid.PageSize),
                        page = grid.PageIndex,
                        records = count,
                        rows = (from p in data
                                select new
                                {
                                    id = p.DrowTokenId,
                                    Name = p.Member.Name,
                                    Status = p.Status,
                                    Creaton = p.Creaton,
                                    Action = p.DrowTokenId
                                }).ToArray()
                    };
                    return JsonConvert.SerializeObject(result, new IsoDateTimeConverter());
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
 public string GetGridData(GridSettings grid)
 {
     try
     {
         return new PayrollBAL().GetGridData(grid,null);
     }
     catch (Exception ex)
     {
         return "";
     }
 }
Exemplo n.º 3
0
 public string GetGridData(GridSettings grid)
 {
     try
     {
         return new MemberBAL().GetGridData(grid,"Member");
     }
     catch (Exception ex)
     {
         return "";
     }
 }
 public string GetGridData(GridSettings grid)
 {
     try
     {
         return new PloatBookingBAL().GetGridData(grid);
     }
     catch (Exception ex)
     {
         return "";
     }
 }
Exemplo n.º 5
0
        public string GetGridDataReports(GridSettings grid, int id, string type)
        {
            try
            {

                return new MemberBAL().GetGridDataReports(grid, type, id);
            }
            catch (Exception ex)
            {
                return "";
            }
        }
Exemplo n.º 6
0
 public string GetGridData(GridSettings grid)
 {
     try
     {
         // var Member = _MemberBAL.GetByName(Convert.ToInt32(Session["MembershipNo"]));
         var Member = _MemberBAL.GetByName(User.Identity.Name);
         return new PayrollBAL().GetGridData(grid, Member.MemberId);
     }
     catch (Exception ex)
     {
         return "";
     }
 }
Exemplo n.º 7
0
        // grid for Member
        public string GetGridData(GridSettings grid, int? MemberId)
        {
            try
            {
                using (var ctx = new BHGroupEntities())
                {
                    IQueryable<MemberPayroll> query;

                    if (MemberId != null)
                    {
                        query = ctx.MemberPayrolls.AsQueryable().Where(x => x.MemberId == MemberId);
                    }
                    else
                    {
                        query = ctx.MemberPayrolls.AsQueryable();
                    }

                    int count;
                    var data = query.GridCommonSettings(grid, out count);

                    var result = new
                    {
                        total = (int)Math.Ceiling((double)count / grid.PageSize),
                        page = grid.PageIndex,
                        records = count,
                        rows = (from p in data
                                select new
                                {
                                    id = p.PaymentId,
                                    Name = p.Member.Name,
                                    Installment = p.Installment,
                                    ReceiveAmt = p.ReceiveAmt,
                                    DueAmt = p.DueAmt,

                                    BankName = p.BankName,
                                    AccountNo = p.AccountNo,
                                    PaymentType = p.PaymentType,
                                    CreatOn = p.CreatOn,
                                    Status = p.Status,
                                    Action = p.PaymentId
                                }).ToArray()
                    };
                    return JsonConvert.SerializeObject(result, new IsoDateTimeConverter());
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 8
0
        public string GetGridDataReports(GridSettings grid)
        {
            try
            {
                //var Member = _MemberBAL.GetByName(Convert.ToInt32(Session["MembershipNo"].ToString()));
                var Member = _MemberBAL.GetByName(User.Identity.Name);

                return new MemberBAL().GetGridDataReports(grid, Member.MemberType, Member.ParentId);
            }
            catch (Exception ex)
            {
                return "";
            }
        }
Exemplo n.º 9
0
        public string GetGridDataReports(GridSettings grid, string Type, int ParentId)
        {
            try
            {
                using (var ctx = new BHGroupEntities())
                {

                    var query = ctx.Prc_ViewCommision(ParentId, Type).ToList().AsQueryable();

                    int count;
                    var data = query.GridCommonSettings(grid, out count);

                    var result = new
                    {
                        total = (int)Math.Ceiling((double)count / grid.PageSize),
                        page = grid.PageIndex,
                        records = count,
                        rows = (from p in data
                                select new
                                {
                                    id = p.MemberId,
                                    Name = p.Name,
                                    MemberShipNo = p.MemberShipNo,
                                    MemberType = p.MemberType,
                                    PloatType = p.PloatType,
                                    Qty = p.Qty,
                                    Total_Commision = p.Total_Commision,
                                    Action = p.MemberId
                                }).ToArray()
                    };
                    return JsonConvert.SerializeObject(result, new IsoDateTimeConverter());
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 10
0
        // grid for Member
        public string GetGridData(GridSettings grid, string Type)
        {
            try
            {
                using (var ctx = new BHGroupEntities())
                {
                    IQueryable<Member> query;

                    if (Type == "Franchies")
                    {
                        query = ctx.Members.AsQueryable().Where(x => ((x.MemberType == "Franchies") || (x.MemberType == "Distributers")));
                    }
                    else
                    {
                        query = ctx.Members.AsQueryable().Where(x => ((x.MemberType == "Member") || (x.MemberType == "Broker")));
                    }

                    int count;
                    var data = query.GridCommonSettings(grid, out count);

                    var result = new
                    {
                        total = (int)Math.Ceiling((double)count / grid.PageSize),
                        page = grid.PageIndex,
                        records = count,
                        rows = (from p in data
                                select new
                                {
                                    id = p.MemberId,
                                    Name = p.Name,
                                    MemberShipNo = p.MemberShipNo,
                                    DOB = p.DOB,
                                    Age = p.Age,
                                    MobileNo = p.MobileNo,
                                    EmailId = p.EmailId,
                                    Password = p.Password,
                                    MemberType = p.MemberType,
                                    Action = p.MemberId
                                }).ToArray()
                    };
                    return JsonConvert.SerializeObject(result, new IsoDateTimeConverter());
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }