void PopulateData()
        {
            DataTable dtCompanyDate = new DataTable();

            dtCompanyDate = dl.SelectMethod("SELECT TM_COMPAYID,TM_NAME FROM TM_COMPANY WHERE TM_ACTIVE=1");
            if (dtCompanyDate.Rows.Count > 0)
            {
                if (dtCompanyDate.Rows.Count == 1)
                {
                    int TM_COMPAYID = 0;
                    int.TryParse(Convert.ToString(dtCompanyDate.Rows[0]["TM_COMPAYID"]), out TM_COMPAYID);

                    Datalayer.iT001_COMPANYID = TM_COMPAYID;

                    this.Close();

                    MDIMaster fmMain = new MDIMaster();
                    fmMain.Show();
                }
                else
                {
                    dgDisplayData.DataSource = dtCompanyDate;
                }
            }
            else
            {
                dgDisplayData.DataSource = null;
            }
        }
        void Filldata()
        {
            if (dgDisplayData.SelectedRows.Count > 0)
            {
                int iTL01_SCHOOLID = 0;
                int.TryParse(dgDisplayData.CurrentRow.Cells["TM_COMPAYID"].Value.ToString(), out iTL01_SCHOOLID);

                Datalayer.iT001_COMPANYID = iTL01_SCHOOLID;

                MDIMaster fmMain = new MDIMaster();
                fmMain.Show();

                this.Hide();
            }
            else
            {
                Datalayer.InformationMessageBox(Datalayer.sMeessgeSelection);
            }
        }