Exemple #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;
            }
        }
Exemple #2
0
        async void LoadGridBatch(string NoBalitTanah = "")
        {
            var empNo = CommonWeb.GetCurrentEmployeeNo();
            var ret   = await orderControls.GetBatchDataByPIC(empNo);

            var datas = ret;

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

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