public object GetByPrimaryKey(ENT.DMT_SlabCommission Entity)
        {
            object objResult = null;

            try
            {
                DAL.CRUDOperation tt = new DAL.CRUDOperation();
                objResult = tt.GetEntityByPrimartKey(Entity);
            }
            catch (Exception)
            {
                throw;
            }
            return(objResult);
        }
 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));
 }
        private bool disposedValue = false; // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    // TODO: dispose managed state (managed objects).
                }
                objDAL    = null;
                clsDAL    = null;
                Entity    = null;
                lstEntity = null;
                // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
                // TODO: set large fields to null.

                disposedValue = true;
            }
        }