Exemplo n.º 1
0
        private void btnSaveData_Click(object sender, EventArgs e)
        {
            if (cmdTo.SelectedIndex == -1)
            {
                clsUtility.ShowInfoMessage("Please select To Shop.", clsUtility.strProjectTitle);
                return;
            }

            if (dgvProductDetails.Rows.Count == 0)
            {
                clsUtility.ShowInfoMessage("Please Enter Items.", clsUtility.strProjectTitle);
                return;
            }
            if (lblBillStatus.Text == "Posted")
            {
                clsUtility.ShowInfoMessage("The Bill Status is Posted. you can not make any changes.", clsUtility.strProjectTitle);
                return;
            }
            if (IsValidateQTY())
            {
                Sales.frmQTYValidation frmQTYValidation = new Sales.frmQTYValidation();
                frmQTYValidation.TotalQTY = Convert.ToInt32(txtTotalQTY.Text);
                frmQTYValidation.ShowDialog();
                if (Sales.frmQTYValidation.QTYConfirmation == -1)
                {
                    // Exit the bill -Dead bill
                    this.Close();
                }
                else if (Sales.frmQTYValidation.QTYConfirmation == 1)
                {
                    TransferStock();
                    ClearAll();
                }
            }
        }
Exemplo n.º 2
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            if (cmdTo.SelectedIndex == -1)
            {
                clsUtility.ShowInfoMessage("Please select To Shop.", clsUtility.strProjectTitle);
                return;
            }

            if (dgvProductDetails.Rows.Count == 0)
            {
                clsUtility.ShowInfoMessage("Please Enter Items.", clsUtility.strProjectTitle);
                return;
            }
            if (lblBillStatus.Text == "Posted")
            {
                clsUtility.ShowInfoMessage("The Bill Status is Posted. you can not make any changes.", clsUtility.strProjectTitle);
                return;
            }
            if (IsValidateQTY())
            {
                Sales.frmQTYValidation frmQTYValidation = new Sales.frmQTYValidation();
                frmQTYValidation.TotalQTY = Convert.ToInt32(txtTotalQTY.Text);
                frmQTYValidation.ShowDialog();
                if (Sales.frmQTYValidation.QTYConfirmation == -1)
                {
                    // Exit the bill -Dead bill
                    this.Close();
                }
                else if (Sales.frmQTYValidation.QTYConfirmation == 1)
                {
                    string BillNo = TransferStock();

                    Report.Report_Forms.frmStoreTransferReport frmStoreTransferReport = new Report.Report_Forms.frmStoreTransferReport();
                    frmStoreTransferReport.strFromStore = cmdFrom.Text.ToString();
                    frmStoreTransferReport.strToStore   = cmdTo.Text.ToString();

                    frmStoreTransferReport.dtStoreTransferDetails = this.dtItemDetails;
                    frmStoreTransferReport.strTotalQTY            = txtTotalQTY.Text;
                    frmStoreTransferReport.strTotalRate           = txtValue.Text;
                    frmStoreTransferReport.strBillDate            = dtpSalesDate.Value.ToShortDateString();
                    frmStoreTransferReport.strBillNo = BillNo;

                    frmStoreTransferReport.strEmployeeName = GetLoginEmployee();
                    frmStoreTransferReport.ShowDialog();

                    ClearAll();
                }
            }
        }