private void BtnCreateCSVFile_Click(object sender, EventArgs e)
        {
            if (!CheckUtility.SearchConditionCheck(this, lblDate.LabelText, txtBilling_Date.Text.Trim(), true, Utility.DataType.YEARMONTH, 7, 6))
            {
                return;
            }
            try
            {
                SaveFileDialog saveCSV = new SaveFileDialog();
                saveCSV.Filter = "CSV file (*.csv)|*.csv| All Files (*.*)|*.*";
                DateTime yearMonth  = Convert.ToDateTime(txtBilling_Date.Text);
                String   YEAR_MONTH = yearMonth.ToString("yyyyMM");
                saveCSV.FileName = "NCS" + YEAR_MONTH + "-" + System.DateTime.Now.ToString("yyyyMMddHHmmss");

                frmInvoiceListController oController = new frmInvoiceListController();
                DataTable dt = oController.GetInvoiceListForCSVCreate(txtBilling_Date.Text);

                try
                {
                    string return_message = "";
                    return_message = dt.Rows[0]["Error Message"].ToString();
                    if (!string.IsNullOrEmpty(return_message))
                    {
                        MetroMessageBox.Show(this, "\n" + return_message, "Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
                catch (Exception)
                {
                    //Exporting to Excel
                    if (dt.Rows.Count > 0)
                    {
                        if (saveCSV.ShowDialog() == DialogResult.OK) // save as dialog
                        {
                            Utility.WriteToCsvFile(dt, saveCSV.FileName);
                            //MetroMessageBox.Show(this, "\n" + Messages.ComparisonResultDetail.CSVDownloaded, "CSV Downloaded", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        }
                    }
                    else
                    {
                        MetroMessageBox.Show(this, "\n" + Messages.ComparisonResultDetail.NoRecordToDownload, "Failed", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                }
            }
            catch (System.TimeoutException)
            {
                MetroMessageBox.Show(this, "\n" + Messages.General.ServerTimeOut, "Download Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (System.Net.WebException)
            {
                MetroMessageBox.Show(this, "\n" + Messages.General.NoConnection, "Download Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (Exception ex)
            {
                Utility.WriteErrorLog(ex.Message, ex, false);
                MetroMessageBox.Show(this, "\n" + Messages.General.ThereWasAnError, "Download Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }