private void btnAddNewCourier_Click(object sender, EventArgs e)
 {
     frmGeneralCourier objGeneralCourier = new frmGeneralCourier();
     CourierBackOfficeManagement.BLL.RNGenerator objRNGenerator = new CourierBackOfficeManagement.BLL.RNGenerator();
     objGeneralCourier.txtCourierNumber.Text = objRNGenerator.GetUniqueKey();
     objGeneralCourier.ShowDialog();
     dataGridViewGeneralCourier.DataSource = null;
     LoadGeneralCourier();
 }
        private void dataGridViewGeneralCourier_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == dataGridViewGeneralCourier.Columns["clmDelete"].Index)
            {

                try
                {
                    GeneralCourier.GeneralCourierWebService obj = new GeneralCourier.GeneralCourierWebService();
                    GeneralCourierInfo objInfo = new GeneralCourierInfo();
                    objInfo.GeneralCourierID = Convert.ToInt32(dataGridViewGeneralCourier.Rows[e.RowIndex].Cells["clmGeneralCourierID"].Value.ToString());
                    if (DialogResult.Yes == MessageBox.Show("Do You Want Delete ?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Warning))
                    {
                        obj.GeneralCourierDeleteByID(objInfo.GeneralCourierID, TokenCleintEncrypt.Encrypt(ClientTokenBuilder.BuildTokens()));
                        MessageBox.Show("Data Deleted Successfully");
                        LoadGeneralCourier();
                    }

                }
                catch (Exception ex)
                {
                    throw ex;
                }

            }
            if (e.ColumnIndex == dataGridViewGeneralCourier.Columns["clmEdit"].Index)
            {
                int x = Convert.ToInt32(dataGridViewGeneralCourier.CurrentRow.Cells["clmGeneralCourierID"].Value.ToString());
                frmGeneralCourier objGeneralCourier = new frmGeneralCourier(x);
                objGeneralCourier.ShowDialog();
                dataGridViewGeneralCourier.DataSource = null;
                LoadGeneralCourier();

            }
        }