protected void btnSelect_Click(object sender, EventArgs e)
        {
            if (CheckProNo(txtProNo.Text) == false)
            {
                return;
            }
            TB_SupplierAdvancePaymentService mainSer = new TB_SupplierAdvancePaymentService();
            List <TB_SupplierAdvancePayment> pp      = mainSer.GetListArray(" proNo='" + txtProNo.Text.Trim() + "'");

            gvMain.DataSource = pp;
            gvMain.DataBind();

            if (pp.Count > 0)
            {
                TB_SupplierAdvancePaymentsService ordersSer = new TB_SupplierAdvancePaymentsService();
                List <SupplierToInvoiceView>      orders    = ordersSer.GetListArray(" 1=1 and TB_SupplierAdvancePayments.id=" + pp[0].Id);
                gvList.DataSource = orders;
                gvList.DataBind();
            }
            else
            {
                List <SupplierToInvoiceView> orders = new List <SupplierToInvoiceView>();
                gvList.DataSource = orders;
                gvList.DataBind();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                TB_SupplierAdvancePaymentService mainSer = new TB_SupplierAdvancePaymentService();
                List <TB_SupplierAdvancePayment> pp      = new List <TB_SupplierAdvancePayment>();
                gvMain.DataSource = pp;
                gvMain.DataBind();


                TB_SupplierAdvancePaymentsService ordersSer = new TB_SupplierAdvancePaymentsService();
                List <SupplierToInvoiceView>      orders    = new List <SupplierToInvoiceView>();
                gvList.DataSource = orders;
                gvList.DataBind();
            }
        }