public long GetDeletePoMasterById(POMasters itm)
 {
     try
     {
         return(mbc.GetDeletePoMasterById(itm));
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally { }
 }
 public long SaveOrUpdatePoMasterDetails(POMasters itm)
 {
     try
     {
         mbc.SaveOrUpdatePoMasterDetails(itm);
         return(itm.Id);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally { }
 }
 public long GetDeletePoMasterById(POMasters im)
 {
     try
     {
         if (im != null)
         {
             PSF.Delete <POMasters>(im);
         }
         else
         {
             throw new Exception("Value is required and it cannot be null..");
         }
         return(0);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public long SaveOrUpdatePoMasterDetails(POMasters im)
 {
     try
     {
         if (im != null)
         {
             PSF.SaveOrUpdate <POMasters>(im);
         }
         else
         {
             throw new Exception("All Fields are required and it cannot be null..");
         }
         return(im.Id);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        public POMasters GetPoMasterDetailsById(long Id)
        {
            try
            {
                POMasters cntm = null;

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