public long GetDeleteSectorMasterById(SectorMaster secm)
 {
     try
     {
         return(mbc.GetDeleteSectorrowById(secm));
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally { }
 }
 public long SaveOrUpdateSectorMasterDetails(SectorMaster secm)
 {
     try
     {
         mbc.SaveOrUpdateSectorMasterDetails(secm);
         return(secm.Id);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally { }
 }
 public long GetDeleteSectorrowById(SectorMaster im)
 {
     try
     {
         if (im != null)
         {
             PSF.Delete <SectorMaster>(im);
         }
         else
         {
             throw new Exception("Value is required and it cannot be null..");
         }
         return(0);
     }
     catch (Exception)
     {
         throw;
     }
 }
 public long SaveOrUpdateSectorMasterDetails(SectorMaster im)
 {
     try
     {
         if (im != null)
         {
             PSF.SaveOrUpdate <SectorMaster>(im);
         }
         else
         {
             throw new Exception("All Fields are required and it cannot be null..");
         }
         return(im.Id);
     }
     catch (Exception)
     {
         throw;
     }
 }
        public SectorMaster GetSectorDetailsById(long Id)
        {
            try
            {
                SectorMaster secm = null;

                if (Id > 0)
                {
                    secm = PSF.Get <SectorMaster>(Id);
                }
                else
                {
                    throw new Exception("Id is required and it cannot be 0");
                }
                return(secm);
            }
            catch (Exception)
            {
                throw;
            }
        }