protected void SearchProductsPartial_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(PartialProductName.Text))
     {
         ShowMessage("Enter a Product Name or Parial Name", "alert alert-warning");
     }
     else
     {
         try
         {
             ProductController sysmgr01 = new ProductController();
             List <Product>    info01   = sysmgr01.FindByPartialName(PartialProductName.Text);
             if (info01.Count == 0)
             {
                 ShowMessage("No Partial Match was found", "alert alert-warning");
             }
             else
             {
                 info01.Sort((x, y) => x.ProductName.CompareTo(y.ProductName));
                 Fetch01.Enabled       = true;
                 List01.Enabled        = true;
                 List01.DataSource     = info01;
                 List01.DataTextField  = nameof(Product.ProductandID);
                 List01.DataValueField = nameof(Product.ProductID);
                 List01.DataBind();
                 List01.Items.Insert(0, "select...");
             }
         }
         catch (Exception ex)
         {
             ShowMessage(GetInnerException(ex).ToString(), "alert alert-danger");
         }
     }
 }
Esempio n. 2
0
 protected void BindList()
 {
     try
     {
         TeamController sysmgr = new TeamController();
         List <Team>    info   = null;
         info = sysmgr.List();
         info.Sort((x, y) => x.TeamName.CompareTo(y.TeamName));
         List01.DataSource     = info;
         List01.DataTextField  = nameof(Team.TeamName);
         List01.DataValueField = nameof(Team.TeamID);
         List01.DataBind();
         List01.Items.Insert(0, "select...");
     }
     catch (Exception ex)
     {
         MessageLabel.Text = ex.Message;
     }
 }
 protected void BindList()
 {
     try
     {
         Controller02    sysmgr = new Controller02();
         List <Entity02> info   = null;
         info = sysmgr.List();
         info.Sort((x, y) => x.ProductName.CompareTo(y.ProductName));
         List01.DataSource     = info;
         List01.DataTextField  = nameof(Entity02.ProductandID);
         List01.DataValueField = nameof(Entity02.ProductID);
         List01.DataBind();
         List01.Items.Insert(0, "select...");
     }
     catch (Exception ex)
     {
         MessageLabel1.Text = ex.Message;
     }
 }
Esempio n. 4
0
 protected void BindList()
 {
     try
     {
         PlayerController sysmgr = new PlayerController();
         List <Player>    info   = null;
         info = sysmgr.List();
         info.Sort((x, y) => x.LastName.CompareTo(y.LastName));
         List01.DataSource     = info;
         List01.DataTextField  = nameof(Player.NameConcat);
         List01.DataValueField = nameof(Player.PlayerID);
         List01.DataBind();
         List01.Items.Insert(0, "select...");
     }
     catch (Exception ex)
     {
         ShowMessage(ex.ToString(), "alert alert-danger");
     }
 }
Esempio n. 5
0
 protected void BindList()
 {
     try
     {
         PlayerController sysmgr = new PlayerController();
         List <Player>    info   = null;
         info = sysmgr.List();
         info.Sort((x, y) => x.FirstName.CompareTo(y.FirstName));
         List01.DataSource     = info;
         List01.DataTextField  = nameof(Player.FirstandLast);
         List01.DataValueField = nameof(Player.FirstandLast);
         List01.DataBind();
         List01.Items.Insert(0, "select...");
     }
     catch (Exception ex)
     {
         MessageLabel1.Text = ex.Message;
     }
 }
 protected void BindList()
 {
     try
     {
         Fetch02.Enabled = false;
         List02.Enabled  = false;
         Controller01    sysmgr = new Controller01();
         List <Entity01> info   = null;
         info = sysmgr.List();
         info.Sort((x, y) => x.CategoryName.CompareTo(y.CategoryName));
         List01.DataSource     = info;
         List01.DataTextField  = nameof(Entity01.CategoryName);
         List01.DataValueField = nameof(Entity01.CategoryID);
         List01.DataBind();
         List01.Items.Insert(0, "select...");
     }
     catch (Exception ex)
     {
         MessageLabel.Text = ex.Message;
     }
 }
Esempio n. 7
0
 protected void BindList()
 {
     try
     {
         Fetch02.Enabled = false;
         List02.Enabled  = false;
         SchoolsController sysmgr = new SchoolsController();
         List <Schools>    info   = null;
         info = sysmgr.List();
         info.Sort((x, y) => x.SchoolName.CompareTo(y.SchoolName));
         List01.DataSource     = info;
         List01.DataTextField  = nameof(Schools.SchoolName);
         List01.DataValueField = nameof(Schools.SchoolCode);
         List01.DataBind();
         List01.Items.Insert(0, "select...");
     }
     catch (Exception ex)
     {
         ShowMessage(ex.ToString(), "alert alert-danger");
     }
 }
Esempio n. 8
0
 protected void BindList()
 {
     try
     {
         Fetch02.Enabled = false;
         List02.Enabled  = false;
         SchoolControllers sysmgr = new SchoolControllers();
         List <School>     info   = null;
         info = sysmgr.List();
         info.Sort((x, y) => x.SchoolName.CompareTo(y.SchoolName));
         List01.DataSource     = info;
         List01.DataTextField  = nameof(School.SchoolCode);
         List01.DataValueField = nameof(School.SchoolName);
         List01.DataBind();
         List01.Items.Insert(0, "select...");
     }
     catch (Exception ex)
     {
         MessageLabel.Text = ex.Message;
     }
 }