void PopualteData()
        {
            string TM02_PARTYID  = "";
            int    iTM02_PARTYID = 0;

            if (!string.IsNullOrEmpty(cmbName.Text.Trim()))
            {
                int.TryParse(cmbName.SelectedValue.ToString(), out iTM02_PARTYID);
            }

            if (iTM02_PARTYID > 0)
            {
                TM02_PARTYID = iTM02_PARTYID.ToString();
            }

            string sBillType = "";

            if (Datalayer.sPaymentMode == "R")
            {
                sBillType = "Receive";
            }
            else
            {
                sBillType = "Payment";
            }

            MyDa = new MyDabaseDataContext(Properties.Settings.Default.Style_King_Dev);
            List <USP_VP_GET_PAYMENTResult> lst = new List <USP_VP_GET_PAYMENTResult>();

            lst = MyDa.USP_VP_GET_PAYMENT(TM02_PARTYID, null, sBillType, null, dtpFromDate.Value, dtpTodate.Value, Datalayer.iT001_COMPANYID.ToString()).ToList();
            dgDisplayData.DataSource = lst;

            dgDisplayData.Columns["T009_PAYMENTID"].Visible      = false;
            dgDisplayData.Columns["T001_ACCOUNTID"].Visible      = false;
            dgDisplayData.Columns["TM04_BANKID"].Visible         = false;
            dgDisplayData.Columns["TM04_DETAILS"].Visible        = false;
            dgDisplayData.Columns["T001_CONTACT_PERSON"].Visible = false;
            dgDisplayData.Columns["CREDIT"].Visible            = false;
            dgDisplayData.Columns["DEBIT"].Visible             = false;
            dgDisplayData.Columns["T009_PAYMENT_TYPE"].Visible = false;

            dgDisplayData.Columns["T001_NAME"].HeaderText              = "Name";
            dgDisplayData.Columns["T001_MOBILE1"].HeaderText           = "Mobile No";
            dgDisplayData.Columns["T009_DATE"].HeaderText              = "Date";
            dgDisplayData.Columns["T009_DATE"].DefaultCellStyle.Format = "dd-MM-yyyy";
            dgDisplayData.Columns["T009_TYPE"].HeaderText              = "Type";
            dgDisplayData.Columns["T009_PAYMENT_TYPE"].HeaderText      = "Amount Type";
            dgDisplayData.Columns["T009_AMOUNT"].HeaderText            = "Amount";

            dgDisplayData.Columns["T001_NAME"].DisplayIndex         = 0;
            dgDisplayData.Columns["T001_MOBILE1"].DisplayIndex      = 1;
            dgDisplayData.Columns["T009_DATE"].DisplayIndex         = 2;
            dgDisplayData.Columns["T009_TYPE"].DisplayIndex         = 3;
            dgDisplayData.Columns["T009_PAYMENT_TYPE"].DisplayIndex = 4;
            dgDisplayData.Columns["T009_AMOUNT"].DisplayIndex       = 5;

            this.dgDisplayData.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            dgDisplayData.ColumnHeadersDefaultCellStyle.BackColor = Color.FromArgb(Datalayer.sGridHeaderColor1, Datalayer.sGridHeaderColor2, Datalayer.sGridHeaderColor3);
            dgDisplayData.EnableHeadersVisualStyles = false;
            this.dgDisplayData.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleLeft;

            // dgCategory.CurrentRow.DefaultCellStyle.BackColor = Color.White;
            dgDisplayData.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing;
            dgDisplayData.ColumnHeadersHeight         = 30;

            dgDisplayData.ColumnHeadersDefaultCellStyle.Font      = new System.Drawing.Font("Tahoma", 12F, FontStyle.Bold, GraphicsUnit.Pixel);
            dgDisplayData.ColumnHeadersDefaultCellStyle.ForeColor = Color.White;


            dgDisplayData.Columns["T001_NAME"].Width         = 350;
            dgDisplayData.Columns["T001_MOBILE1"].Width      = 120;
            dgDisplayData.Columns["T009_DATE"].Width         = 120;
            dgDisplayData.Columns["T009_TYPE"].Width         = 120;
            dgDisplayData.Columns["T009_PAYMENT_TYPE"].Width = 120;
            dgDisplayData.Columns["T009_AMOUNT"].Width       = 120;
        }