private void BindAllGenerics() { Substances objData = new Substances(); objData.LoadAll(); ui_GvData.DataSource = objData.DefaultView; ui_GvData.DataBind(); }
protected void ui_btn_Click_Click(object sender, EventArgs e) { Substances objData = new Substances(); objData.GetByName(ui_txtGenericName.Text); ui_GvData.DataSource = objData.DefaultView; ui_GvData.DataBind(); }
protected void Button_Generic_Search_Click(object sender, EventArgs e) { Substances objData = new Pricing.BLL.Substances(); objData.GetByName(TextBox_GenericSearch.Text); GridView_Search.DataSource = objData.DefaultView; GridView_Search.DataBind(); ui_modalPopup_Generic.Show(); }
/// <summary> /// /// </summary> private void AddGeneric() { try { Substances objData = new Substances(); objData.AddNew(); objData.NAME = ui_txtGenericName.Text; objData.Approved = true; objData.Save(); ui_lb_msg.ForeColor = System.Drawing.Color.Green; ui_lb_msg.Text = "The new record added successfully"; ResetFields(); } catch { ui_lb_msg.ForeColor = System.Drawing.Color.Red; ui_lb_msg.Text = "Problem while adding the new record"; } }
protected void GridView_Search_PageIndexChanging(object sender, GridViewPageEventArgs e) { GridView_Search.PageIndex = e.NewPageIndex; Substances objData = new Pricing.BLL.Substances(); objData.GetByName(TextBox_GenericSearch.Text); GridView_Search.DataSource = objData.DefaultView; GridView_Search.DataBind(); ui_modalPopup_Generic.Show(); }