示例#1
0
 private void BindAllGenerics()
 {
     Substances objData = new Substances();
     objData.LoadAll();
     ui_GvData.DataSource = objData.DefaultView;
     ui_GvData.DataBind();
 }
示例#2
0
 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();
 }
示例#4
0
        /// <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();
 }