Esempio n. 1
0
 public FrmCategory(Guid?ID = null)
 {
     InitializeComponent();
     if (ID != null)
     {
         getID = Guid.Parse(ID.ToString());
         DataTable dt = CategoryDao.GetCategoryById(getID);
         if (dt != null)
         {
             txtCategory.Text = dt.Rows[0]["Category"].ToString();
             txtDes.Text      = dt.Rows[0]["Des"].ToString();
         }
     }
 }
Esempio n. 2
0
 /// <summary>
 /// GetCategoryById - lấy về category theo id
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public DataTable GetCategoryById(int id)
 {
     return(categoryDao.GetCategoryById(id));
 }