예제 #1
0
 private void BindRecipeData()
 {
     try
     {
         DataTable dtu = con.SelecthostProc(Com_username, "Recipe_View_Select", null, null);
         GridView_Recipes.DataSource = dtu;
         GridView_Recipes.DataBind();
     }
     catch (Exception ex)
     {
         con.ExcutehostProc(Com_username, "Log_Issues", new string[] { "msg", "details" }, ex.Message, "Err-Recipes-BindRecipeData");
     }
 }
예제 #2
0
 protected void GridView_Recipes_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     try
     {
         BindRecipeData();
         GridView_Recipes.PageIndex = e.NewPageIndex;
         GridView_Recipes.DataBind();
         NotifyMsg("", "none", "");
     }
     catch (Exception ex)
     {
         con.ExcutehostProc(Com_username, "Log_Issues", new string[] { "msg", "details" }, ex.Message, "Err-Recipes-GridView_Recipes_PageIndexChanging");
     }
 }
예제 #3
0
    protected void GridView_Recipes_Sorting(object sender, GridViewSortEventArgs e)
    {
        try
        {
            DataTable dtu = con.SelecthostProc(Com_username, "Recipe_View_Select", null, null);

            if (dtu != null)
            {
                DataView dataView = new DataView(dtu);
                dataView.Sort = e.SortExpression + " " + ConvertSortDirectionToSql(e.SortDirection);

                GridView_Recipes.DataSource = dataView;
                GridView_Recipes.DataBind();
            }
        }
        catch (Exception ex)
        {
            con.ExcutehostProc(Com_username, "Log_Issues", new string[] { "msg", "details" }, ex.Message, "Err-Recipes-GridView_Recipes_Sorting");
        }
    }