示例#1
0
        private void btnFinalSubmit_Click(object sender, EventArgs e)
        {
            SalesExpense salesExpense = GetBalancedData();

            apiHandler.AddSalesExpenseData(salesExpense);

            if (dg_employeeWages != null)
            {
                dgHandler.PostEmployeeWagesGVRecords(apiHandler, dg_employeeWages);
            }
            else
            {
                MessageBox.Show("Cannot Employee  Details:Employee Table does not have any data");
            }
            if (dg_salesRecord != null)
            {
                dgHandler.PostSalesGVRecords(apiHandler, dg_salesRecord);
            }
            else
            {
                MessageBox.Show("Cannot Add Sales Details:Sales Table does not have any data");
            }
            if (dg_supplier != null)
            {
                dgHandler.PostSuplierGVRecords(apiHandler, dg_supplier);
            }
            else
            {
                MessageBox.Show("Cannot Add Supplier Details:Supplier Table does not have any data");
            }
        }
示例#2
0
        private SalesExpense GetBalancedData()
        {
            SalesExpense salesExpense = new SalesExpense();

            salesExpense.Date = Convert.ToDateTime(dpSaleExpence.Value.ToString("D"));
            salesExpense.SupplierAmountPaid        = Convert.ToDecimal(txtSupplierAmountPaid.Text);
            salesExpense.TotalFTPOSAmount          = Convert.ToDecimal(txtFtposAmount.Text);
            salesExpense.EmployeeAmountPaid        = Convert.ToDecimal(txtlbEmployeeAmountPaid.Text);
            salesExpense.CashLeftToday             = Convert.ToDecimal(txtCashleftFinal.Text);
            salesExpense.CashTakenFromPreviousSale = Convert.ToDecimal(txtCashFromPrevousDayFinal.Text);
            salesExpense.TotalTillSale             = Convert.ToDecimal(txtTotalTill.Text);
            salesExpense.TotalExpence = (salesExpense.EmployeeAmountPaid + salesExpense.SupplierAmountPaid);
            return(salesExpense);
        }
示例#3
0
        internal void AddSalesExpenseData(SalesExpense salesExpense)
        {
            HttpResponseMessage responseemp = client.PostAsJsonAsync("api/salesbalance/authorize/salesbalance", salesExpense).Result;

            Console.Write(responseemp.ToString());
        }