public JsonResult GetSlabByID(string id)
        {
            List <ENT.DMT_SlabCommission> lstResult = new List <Web.Framework.Entity.DMT_SlabCommission>();

            BAL.DMT_SlabCommission objBALV = new BAL.DMT_SlabCommission();
            if (id != null)
            {
                Guid Byid = new Guid(id);
                lstResult = objBALV.GetSlabBYID(Byid);
            }
            return(Json(lstResult, JsonRequestBehavior.AllowGet));
        }
 public JsonResult SaveCommision(String[] hffrom, String[] hfto, String[] hfmd, String[] hfsd, String[] hfrd, String[] hftype, Guid up_dmtslabid)
 {
     GlobalVarible.Clear();
     try
     {
         if (hffrom == null || hfto == null || hfmd == null || hfsd == null || hfrd == null || hftype == null)
         {
             GlobalVarible.AddError("please add pricing details for all level !");
             return(Json(MySession.Current.MessageResult, JsonRequestBehavior.AllowGet));
         }
         if (hffrom.Length > 0)
         {
             List <ENT.DMT_SlabCommission> priceList = new List <ENT.DMT_SlabCommission>();
             for (int sc = 0; sc < hffrom.Length; sc++)
             {
                 ENT.DMT_SlabCommission pdmodel = new Web.Framework.Entity.DMT_SlabCommission();
                 pdmodel.dmtslabcommid   = Guid.NewGuid();
                 pdmodel.CreatedDateTime = DateTime.Now;
                 pdmodel.CreatedBy       = Guid.Parse(User.Identity.GetUserId());
                 pdmodel.dmtslabid       = up_dmtslabid;
                 pdmodel.dmtfromval      = decimal.Parse(hffrom[sc]);
                 pdmodel.dmttoval        = decimal.Parse(hfto[sc]);
                 pdmodel.dmtmd           = decimal.Parse(hfmd[sc]);
                 pdmodel.dmtsd           = decimal.Parse(hfsd[sc]);
                 pdmodel.dmtrd           = decimal.Parse(hfrd[sc]);
                 pdmodel.dmttype         = int.Parse(hftype[sc]);
                 priceList.Add(pdmodel);
             }
             using (BAL.DMT_SlabCommission objPrice = new BAL.DMT_SlabCommission())
             {
                 int Val = objPrice.BulkInsert(priceList);
                 if (Val > 0)
                 {
                     GlobalVarible.AddMessage("Dmt Commission Saved Successfully.");
                 }
             }
         }
     }
     catch (Exception ex)
     {
         GlobalVarible.AddError(ex.Message);
     }
     MySession.Current.MessageResult.MessageHtml = GlobalVarible.GetMessageHTML();
     return(Json(MySession.Current.MessageResult, JsonRequestBehavior.AllowGet));
 }