private void btnPost_Click(object sender, EventArgs e) { if (rdoSaleNo.Checked) { if (CheckRequiredFieldForSaleNo()) { SaleController saleController = new SaleController(); saleController.PostBySaleNo(this.cboFromSaleInvoiceNo.Text, this.cboToSaleInvoiceNo.Text); string log = "Form-Posting;Item-Posting:" + "From" + "(" + this.cboFromSaleInvoiceNo.SelectedText + ")" + "To" + "(" + this.cboToSaleInvoiceNo.SelectedText + ")" + ";action-Post"; userAction.Log(log); this.BindFromSaleNo(); this.BindToSaleNo(); Globalizer.ShowMessage(MessageType.Information, "Posted Successfully"); } } else { if (CheckRequiredFieldForSaleDate()) { try { SaleController saleController = new SaleController(); saleController.PostBySaleDate(dtpFromSaleDate.Value, dtpToSaleDate.Value); string log = "Form-Posting;Item-Posting:" + "From" + "(" + this.dtpFromSaleDate.ToString() + ")" + "To" + "(" + this.dtpToSaleDate.ToString() + ")" + ";action-Post"; userAction.Log(log); Globalizer.ShowMessage(MessageType.Information, "Posted Successfully"); } catch (Exception ex) { Globalizer.ShowMessage(MessageType.Warning, ex.Message); } } } }