Exemplo n.º 1
0
 /// <summary>
 /// Method Name:BtnDetails_Click
 /// Description:Show the Data in Grid control while clicking Details Button
 /// Author:Bhumi
 /// Created On:10/7/2015
 /// </summary>
 protected void BtnDetails_Click(object sender, EventArgs e)
 {
     try
     {
         if (DdlEmployee.SelectedValue == "0")
         {
             objconst = new ConstantMessages();
             ClientScript.RegisterStartupScript(this.GetType(), "msgbox", "alert('" + objconst.strAlertEmployeeName + "');", true);
         }
         else
         {
             strBrSelectQuery = new StringBuilder("SELECT EmployeeDetailID,Address,Email,Salary ");
             strBrSelectQuery.Append(" FROM EmployeeDetail");
             strBrSelectQuery.Append(" WHERE Name= '" + DdlEmployee.SelectedValue + "'");
             objfunction           = new CommonFunction();
             gvEmployee.DataSource = objfunction.ConnectionGenerate(strBrSelectQuery.ToString());
             gvEmployee.DataBind();
         }
     }
     catch (Exception)
     {
         objconst = new ConstantMessages();
         Response.Redirect(objconst.strErrorPage, false);
     }
     finally
     {
         strBrSelectQuery = null;
         objfunction      = null;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Method Name:BindData
 /// Description:Fill the Data in Dropdownlist from Database table
 /// Author:Bhumi
 /// Created On:10/7/2015
 /// </summary>
 public void BindData()
 {
     try
     {
         strBrSelectQuery = new StringBuilder("SELECT Name ");
         strBrSelectQuery.Append(" FROM EmployeeDetail");
         objfunction                = new CommonFunction();
         DdlEmployee.DataSource     = objfunction.ConnectionGenerate(strBrSelectQuery.ToString());
         DdlEmployee.DataValueField = "Name";
         DdlEmployee.DataTextField  = "Name";
         DdlEmployee.DataBind();
         Cache.Insert("EmployeeName", objfunction.ConnectionGenerate(strBrSelectQuery.ToString()),
                      null, DateTime.Now.AddSeconds(15),
                      System.Web.Caching.Cache.NoSlidingExpiration);
     }
     catch (Exception)
     {
         objconst = new ConstantMessages();
         Response.Redirect(objconst.strErrorPage, false);
     }
     finally
     {
         strBrSelectQuery = null;
         objfunction      = null;
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Method Name:BindData
 /// Description:Fill the Data in Dropdownlist from Database table
 /// Author:Bhumi
 /// Created On:10/7/2015
 /// </summary>
 public void BindData()
 {
     try
     {
         if (Cache["EmployeeName"] == null)
         {
             LblCacheStatus.Visible = true;
         }
         else
         {
             DdlEmployee.DataSource     = Cache["EmployeeName"];
             DdlEmployee.DataValueField = "Name";
             DdlEmployee.DataTextField  = "Name";
             DdlEmployee.DataBind();
         }
     }
     catch (Exception)
     {
         objconst = new ConstantMessages();
         Response.Redirect(objconst.strErrorPage, false);
     }
     finally
     {
         strBrSelectQuery = null;
         objfunction      = null;
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Method Name:BtnDetails_Click
 /// Description:Show the Data in Grid control while clicking Details Button
 /// Author:Bhumi
 /// Created On:10/7/2015
 /// </summary>
 protected void BtnDetails_Click(object sender, EventArgs e)
 {
     try
     {
         objconst = new ConstantMessages();
         Response.Redirect(objconst.strCache_Ex7Page, false);
     }
     catch (Exception)
     {
         objconst = new ConstantMessages();
         Response.Redirect(objconst.strErrorPage, false);
     }
     finally
     {
         objconst = null;
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// Method Name:BindData
 /// Description:Fill the Data in Dropdownlist from Database table
 /// Author:Bhumi
 /// Created On:10/7/2015
 /// </summary>
 public void BindData()
 {
     try
     {
         strBrSelectQuery = new StringBuilder("SELECT Name ");
         strBrSelectQuery.Append(" FROM EmployeeDetail");
         objfunction                = new CommonFunction();
         DdlEmployee.DataSource     = objfunction.ConnectionGenerate(strBrSelectQuery.ToString());
         DdlEmployee.DataValueField = "Name";
         DdlEmployee.DataTextField  = "Name";
         DdlEmployee.DataBind();
     }
     catch (Exception)
     {
         objconst = new ConstantMessages();
         Response.Redirect(objconst.strErrorPage, false);
     }
     finally
     {
         strBrSelectQuery = null;
         objfunction      = null;
     }
 }
Exemplo n.º 6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     objconst = new ConstantMessages();
     Response.Write(objconst.strErrorMessage);
 }