Ejemplo n.º 1
0
        private async void RefreshGrid(string Filter = "Filter1")
        {
            Session["Filter"] = Filter;
            var myLab = CommonWeb.GetUserLab();

            if (Filter == "Filter1")
            {
                var ret = await orderControls.GetDataPenyelia(myLab);

                var datas = ret;
                if (datas != null)
                {
                    GridvData.DataSource = datas;
                    GridvData.DataBind();
                }
            }
            else if (Filter == "Filter2")
            {
                var ret = await orderControls.GetDataSelesai(myLab);

                var datas = ret;
                if (datas != null)
                {
                    GridvData.DataSource = datas;
                    GridvData.DataBind();
                }
            }
            else if (Filter == "Filter3")
            {
                var ret = await orderControls.GetBatchData();

                var datas = ret;
                if (datas != null)
                {
                    GvBatch.DataSource = datas;
                    GvBatch.DataBind();
                }
            }

            if (GridvData.Rows.Count > 0 && (Filter == "Filter1" || Filter == "Filter2"))
            {
                GridvData.UseAccessibleHeader    = true;
                GridvData.HeaderRow.TableSection = TableRowSection.TableHeader;
            }
            else if (GvBatch.Rows.Count > 0 && Filter == "Filter3")
            {
                GvBatch.UseAccessibleHeader    = true;
                GvBatch.HeaderRow.TableSection = TableRowSection.TableHeader;
            }
        }
Ejemplo n.º 2
0
        private void RefreshGrid()
        {
            var myLab = CommonWeb.GetUserLab();
            var ret   = orderControls.GetData(myLab);
            var datas = ret.Result;

            GridvData.DataSource = datas;
            GridvData.DataBind();


            if (GridvData.Rows.Count > 0)
            {
                GridvData.UseAccessibleHeader    = true;
                GridvData.HeaderRow.TableSection = TableRowSection.TableHeader;
            }
        }