protected void gvw_CardTypeService_AfterPerformCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewAfterPerformCallbackEventArgs e)
        {
            var grid = sender as DevExpress.Web.ASPxGridView.ASPxGridView;

            if (e.CallbackName == "APPLYFILTER")
            {
                var queryInfo = new QueryInfo <T_Vip_CardType_Service>();
                Dictionary <string, object> query = JsonConvert.DeserializeObject <Dictionary <string, object> >(e.Args[0].ToString());
                queryInfo.SetQuery(query.ToDictionary(x => x.Key, y => y.Value)).SetQuery("is_order_detail", false).SetQuery("is_free", true);
                grid.DataSource = _cardTypeService.Select(queryInfo);
                grid.DataBind();
            }
        }
    //protected void Timer1_Tick(object sender, EventArgs e)
    //{
    //        this.ASPxPager1.PageIndex = this.ASPxPager1.PageIndex + 1;
    //        this.grvSTK_Customer.DataSource = dtResult;
    //        this.grvSTK_Customer.DataBind();
    //        this.grvSTK_Customer.PageIndex = this.ASPxPager1.PageIndex;
    //}
    //protected void grvSTK_Customer_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e)
    //{

    //    //this.pageIndex = this.grvSTK_Customer.PageIndex + 1;
    //    //if (this.pageIndex >= this.grvSTK_Customer.PageCount)
    //    //{
    //    //    this.pageIndex = 0;
    //    //}

    //    //this.grvSTK_Customer.PageIndex = this.pageIndex;
    //}
    protected void grvSTK_Customer_AfterPerformCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewAfterPerformCallbackEventArgs e)
    {
        ASPxGridView editor = sender as ASPxGridView;

        try
        {
            switch (e.CallbackName)
            {
            case "APPLYFILTER":
                editor.PageIndex = 0;
                break;

            case "APPLYHEADERCOLUMNFILTER":
                editor.PageIndex = 0;
                break;

            case "CUSTOMCALLBACK":
                this.pageIndex = editor.PageIndex + 1;

                if (this.pageIndex >= editor.PageCount)
                {
                    this.pageIndex = 0;

                    double minute   = DateTime.Now.Subtract((DateTime)Session["LAST_UPDATE"]).TotalMinutes;
                    double timediff = double.Parse(ConfigurationManager.AppSettings["TimeDiff"]);
                    if (minute >= timediff)
                    {
                        this.GetStockByCustomer();
                    }
                }

                editor.PageIndex = this.pageIndex;
                break;

            case "SORT":
                editor.PageIndex = 0;
                break;

            default:
                break;
            }
        }
        catch (Exception ex)
        {
        }
    }
Beispiel #3
0
 protected void dxgvPODetails_AfterPerformCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewAfterPerformCallbackEventArgs e)
 {
     try
     {
     }
     catch (Exception ex)
     {
         ex.Data.Add("UILayerException", this.GetType().ToString() + Constant.Error_Seperator + "protected void dxgvPODetails_AfterPerformCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewAfterPerformCallbackEventArgs e)");
         if (Master.LoggedUser != null && Master.LoggedUser.UserName != null && Master.LoggedUser.UserName != string.Empty)
         {
             Response.Redirect("Error.aspx?LogId=" + LankaTilesExceptions.WriteEventLogs(ex, Constant.Database_Connection_Name, Master.LoggedUser.UserName), false);
         }
         else
         {
             Response.Redirect("Error.aspx?LogId=" + LankaTilesExceptions.WriteEventLogs(ex, Constant.Database_Connection_Name, "Annonimous"), false);
         }
     }
 }