public static LIB_Category GetLIB_CategoryByCategoryID(int CategoryID) { LIB_Category lIB_Category = new LIB_Category(); SqlLIB_CategoryProvider sqlLIB_CategoryProvider = new SqlLIB_CategoryProvider(); lIB_Category = sqlLIB_CategoryProvider.GetLIB_CategoryByCategoryID(CategoryID); return lIB_Category; }
protected void btnUpdate_Click(object sender, EventArgs e) { LIB_Category lIB_Category = new LIB_Category (); lIB_Category.CategoryID= int.Parse(Request.QueryString["ID"].ToString()); lIB_Category.CategoryName= txtCategoryName.Text; lIB_Category.AddedBy= Profile.card_id; lIB_Category.AddedDate= DateTime.Now; lIB_Category.ModifiedBy= Profile.card_id; lIB_Category.ModifiedDate= DateTime.Now; bool resutl =LIB_CategoryManager.UpdateLIB_Category(lIB_Category); Response.Redirect("AdminDisplayLIB_Category.aspx"); }
protected void btnAdd_Click(object sender, EventArgs e) { LIB_Category lIB_Category = new LIB_Category (); // lIB_Category.CategoryID= int.Parse(ddlCategoryID.SelectedValue); lIB_Category.CategoryName= txtCategoryName.Text; lIB_Category.AddedBy= Profile.card_id; lIB_Category.AddedDate= DateTime.Now; lIB_Category.ModifiedBy= Profile.card_id; lIB_Category.ModifiedDate= DateTime.Now; int resutl =LIB_CategoryManager.InsertLIB_Category(lIB_Category); Response.Redirect("AdminDisplayLIB_Category.aspx"); }
private void showLIB_CategoryData() { LIB_Category lIB_Category = new LIB_Category (); lIB_Category = LIB_CategoryManager.GetLIB_CategoryByCategoryID(Int32.Parse(Request.QueryString["ID"])); txtCategoryName.Text =lIB_Category.CategoryName.ToString(); }
public static bool UpdateLIB_Category(LIB_Category lIB_Category) { SqlLIB_CategoryProvider sqlLIB_CategoryProvider = new SqlLIB_CategoryProvider(); return sqlLIB_CategoryProvider.UpdateLIB_Category(lIB_Category); }
public static int InsertLIB_Category(LIB_Category lIB_Category) { SqlLIB_CategoryProvider sqlLIB_CategoryProvider = new SqlLIB_CategoryProvider(); return sqlLIB_CategoryProvider.InsertLIB_Category(lIB_Category); }