Esempio n. 1
0
 /// <summary>
 /// Function to fill all Routes in datagridview based on the search key
 /// </summary>
 public void GridFill()
 {
     try
     {
         RouteSP   spRoute = new RouteSP();
         DataTable dtbl    = new DataTable();
         dtbl = spRoute.RouteSearch(txtRouteNameSearch.Text.Trim(), cmbAreaSearch.Text.ToString());
         dgvRoute.DataSource = dtbl;
     }
     catch (Exception ex)
     {
         MessageBox.Show("RT3" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
        /// <summary>
        /// Function to get details based on parameters
        /// </summary>
        /// <param name="strRouteName"></param>
        /// <param name="strAreaName"></param>
        /// <returns></returns>
        public List <DataTable> RouteSearch(String strRouteName, String strAreaName)
        {
            List <DataTable> ListObj = new List <DataTable>();

            try
            {
                ListObj = spRoute.RouteSearch(strRouteName, strAreaName);
            }
            catch (Exception ex)
            {
                MessageBox.Show("RT5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(ListObj);
        }