Ejemplo n.º 1
0
 private void BindAllGenerics()
 {
     Substances objData = new Substances();
     objData.LoadAll();
     ui_GvData.DataSource = objData.DefaultView;
     ui_GvData.DataBind();
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 3
0
 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();
 }
Ejemplo n.º 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";
            }
        }
Ejemplo n.º 5
0
 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();
 }