public long SaveOrUpdateUOMMasterDetails(UOMMaster itm)
 {
     try
     {
         mbc.SaveOrUpdateUOMMasterDetails(itm);
         return(itm.Id);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally { }
 }
 public long SaveOrUpdateUOMMasterDetails(UOMMaster im)
 {
     try
     {
         if (im != null)
         {
             PSF.SaveOrUpdate <UOMMaster>(im);
         }
         else
         {
             throw new Exception("All Fields are required and it cannot be null..");
         }
         return(im.Id);
     }
     catch (Exception)
     {
         throw;
     }
 }
        public UOMMaster GetUOMMasterDetailsById(long Id)
        {
            try
            {
                UOMMaster UOM = null;

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