protected void Save_or_Update_batch_deployment()
 {
     if (this.gdv_deployment_summary.Rows.Count > 0)
     {
         System.Windows.Forms.DialogResult dialogResult = MessageBox.Show("This might take a while.Save Batch Deploy?", " Batch Deploy", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);
         if (dialogResult == System.Windows.Forms.DialogResult.Yes)
         {
             for (int i = 0; i < this.gdv_deployment_summary.Rows.Count; i++)
             {
                 string   guard_number           = this.gdv_deployment_summary.Rows[i].Cells[1].Value.ToString();
                 string   guard_name             = this.gdv_deployment_summary.Rows[i].Cells[0].Value.ToString();
                 DateTime deployment_date        = Convert.ToDateTime(this.gdv_deployment_summary.Rows[i].Cells[2].Value);
                 string   deploy_type            = this.gdv_deployment_summary.Rows[i].Cells[8].Value.ToString();
                 string   branch_name            = this.gdv_deployment_summary.Rows[i].Cells[9].Value.ToString();
                 string   client_code            = this.gdv_deployment_summary.Rows[i].Cells[5].Value.ToString();
                 string   client_location        = this.gdv_deployment_summary.Rows[i].Cells[6].Value.ToString();
                 string   fire_arm_serial        = this.gdv_deployment_summary.Rows[i].Cells[11].Value.ToString();
                 int      ammunition_count       = Convert.ToInt32(this.gdv_deployment_summary.Rows[i].Cells[12].Value.ToString());
                 string   shift_type             = this.gdv_deployment_summary.Rows[i].Cells[7].Value.ToString();
                 bool     is_leave_day_for_guard = Convert.ToBoolean(this.gdv_deployment_summary.Rows[i].Cells[13].Value);
                 DateTime date  = this.dt_start_date.Value.Date;
                 DateTime value = this.dt_end_date.Value;
                 Guard_deployment.Save_new_deployment_record("save_new_deployment_record", date, value.Date, SystemConst._username, guard_number, deployment_date, deploy_type, branch_name, client_code, client_location, guard_name, fire_arm_serial, ammunition_count, shift_type, is_leave_day_for_guard, frm_guard_deployment_summary_batch._is_public_holiday, frm_guard_deployment_summary_batch._is_weekend, SystemConst._user_id);
                 Guard_deployment.Save_deployment_schedule(deployment_date, Convert.ToInt32(SystemConst._active_deployment_id), guard_number);
             }
         }
         else if (dialogResult == System.Windows.Forms.DialogResult.No)
         {
             base.Visible = true;
         }
         MessageBox.Show(string.Concat("Successfully deployed all guards in ", this.cbo_branch.Text, " for this date"), "Batch Guard Deployments", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
         this.chk_save_status.Checked = true;
     }
 }