Ejemplo n.º 1
0
        void RefreshGrid()
        {
            Dictionary <string, double> Progress = new Dictionary <string, double>();
            var ret   = ordersamplecontrols.GetDataAsync(_orderno);
            var datas = ret.Result;

            foreach (var item in datas)
            {
                using (var db = new smlpobDB())
                {
                    var itemProgress = (from x in db.orderanalysisdetailtbls
                                        where x.orderNo == lblorder.Text && x.sampleNo == item.noBalittanah
                                        select x).ToList();
                    if (itemProgress != null)
                    {
                        var total = (double)itemProgress.Count(x => x.status == "Diproses");
                        total = (total / itemProgress.Count) * 100;
                        Progress.Add(item.noBalittanah, total);
                    }
                }
            }
            ViewState["Progress"] = Progress;
            GvData.DataSource     = datas;
            GvData.DataBind();

            if (GvData.Rows.Count > 0)
            {
                GvData.UseAccessibleHeader    = true;
                GvData.HeaderRow.TableSection = TableRowSection.TableHeader;
            }
        }
        void RefreshGrid()
        {
            var ret   = ordersamplecontrols.GetDataAsync(_orderno);
            var datas = ret.Result;

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

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