public void BindChuongThuoc()
        {
            if (ddlLoaiCa.SelectedValue == "0")
            {
                grvDanhSach.Visible = false;
            }
            else
            {
                grvDanhSach.Visible = true;
                decimal   KhoiLuong = 0;
                int       SoLuongCa = 0;
                int       SoLuongTT = 0;
                DateTime  NgayAn    = DateTime.MinValue;
                DataTable tblChuong;
                if (ddlRowStatus.SelectedValue == "1")
                {
                    tblChuong = csCont.CaSauAn_GetChuongByThuocByLoaiCa(int.Parse(hdCaSauAn.Value), int.Parse(ddlThuoc.SelectedValue), int.Parse(ddlLoaiCa.SelectedValue), out KhoiLuong, out SoLuongCa, out SoLuongTT, out NgayAn);
                }
                else
                {
                    tblChuong = csCont.CaSauAn_GetChuongByThuocByLoaiCa_Delete(int.Parse(hdCaSauAn.Value), int.Parse(ddlThuoc.SelectedValue), int.Parse(ddlLoaiCa.SelectedValue), out KhoiLuong, out SoLuongCa, out SoLuongTT, out NgayAn);
                }
                int    maxTest   = 3;
                string s         = "";
                int    temp      = 1;
                int    countTest = 0;
                for (int i = 0; i < tblChuong.Rows.Count; i++)
                {
                    if (tblChuong.Rows[i]["KhoiLuong"] != DBNull.Value)
                    {
                        s = Convert.ToDecimal(tblChuong.Rows[i]["KhoiLuong"]).ToString("0.#####");
                        int vitriphancach = s.LastIndexOf(thapphan);
                        if (vitriphancach >= 0)
                        {
                            temp = s.Length - vitriphancach - 1;
                        }
                        if (temp > ChuongScale)
                        {
                            ChuongScale = temp;
                        }
                        countTest++;
                        if (countTest == maxTest)
                        {
                            break;
                        }
                    }
                }

                grvDanhSach.DataSource = tblChuong;
                grvDanhSach.DataBind();
                txtKhoiLuongPhanBo.Text = txtKhoiLuong.Text = KhoiLuong.ToString("0.#####");
                txtSoCaAn.Text          = Config.ToXVal2(SoLuongCa, 0);
                hdNgayAn.Value          = NgayAn.ToString("dd/MM/yyyy");
            }
        }