public void savePriceScheme()
        {
            LaundryPriceSchemeDataEntity entity = new LaundryPriceSchemeDataEntity();
            LaundryCategoryDataEntity category = new LaundryCategoryDao().GetByName("Colored Garments");
            LaundryServiceDataEntity service = new LaundryServiceDao().GetByName("Wash - Dry - Fold");
            entity.Category = category;
            entity.Service = service;
            entity.Description = "sample price scheme";
            entity.Price = 29.00M;

            LaundryPriceSchemeDao dao = new LaundryPriceSchemeDao();
            //dao.Save(entity);
        }
 public void Delete(LaundryPriceSchemeDataEntity p_priceScheme)
 {
     using(var session = NHibernateHelper.OpenSession())
     {
         using(var transaction = session.BeginTransaction())
         {
             try
             {
                 session.Delete(p_priceScheme);
                 transaction.Commit();
             }
             catch(Exception ex)
             {
                 transaction.Rollback();
                 throw ex;
             }
         }
     }
 }
 void cmbcategory_selectedindexchanged(object sender, EventArgs e)
 {
     priceEntity = m_presenter.getLaundryPrice(cmbcategory.Text,cmbservices.Text);
     txtunitprice.Text = priceEntity.Price.ToString("N2");
     txtnoitems.Focus();
 }
 public void DeletePriceScheme(LaundryPriceSchemeDataEntity priceScheme)
 {
     m_priceSchemeDao.Delete(priceScheme);
 }
 public LaundryPriceSchemeDataEntity getLaundryPrice(string p_category, string p_service)
 {
     LaundryPriceSchemeDataEntity priceEntity = new LaundryPriceSchemeDataEntity();
     priceEntity = m_priceDao.GetByCategoryService(getServiceByName(p_service), getCategoryByName(p_category));
     return priceEntity;
 }