Ejemplo n.º 1
0
 public void setId(int invoiceId, APCEntities APCContext1)
 {
     APCContext = APCContext1;
     DataTable dtPaymentFromCustomer = BLInvoice.GetInvoiceById(invoiceId);
     if (dtPaymentFromCustomer.Rows.Count > 0)
     {
         DataRow invoiceRow = dtPaymentFromCustomer.Rows[0];
         //int invoiceId = int.Parse(invoiceRow["Id"].ToString());
         tbInvoiceId.Text = invoiceRow["Id"].ToString();
         tbPaymentDue.Text = ((decimal.Parse(invoiceRow["TotalDue"].ToString())) - TotalPaid(invoiceId)).ToString("N");
     }
 }
Ejemplo n.º 2
0
 private void PaymentToSupplierForm_Load(object sender, EventArgs e)
 {
     lblTodaysDate.Text = DateTime.Today.ToShortDateString();
     lblPurchaseNotInvoiced.Text = calculateBalance(false, false, false).ToString();
     lblArconInvoiceNotPaid.Text = calculateBalance(true, false, false).ToString();
     lblPaymentDueForSupplier.Text = calculateBalance(false, false, true).ToString();
     APCContext = new APCEntities();
     cbPaid.Enabled = false;
     cbInvoiced.Enabled = false;
     cbALL.Checked = true;
     DataTable dt = BLSupplierInvoice.GetSupplierInvoiceDueDatePOInvoicedAndPaid(DateTime.Today.AddDays(14), cbInvoiced.Checked, cbPaid.Checked, cbALL.Checked);
     dgReminderSupplierPayment.DataSource = dt;
 }
 public void setId(int SupplierInvoiceId, APCEntities APCContext1)
 {
     APCContext = APCContext1;
     DataTable dtSupplierInvoice = BLSupplierInvoice.GetSupplierInvoiceById(SupplierInvoiceId);
     if (dtSupplierInvoice.Rows.Count > 0)
     {
         DataRow supplierInvoiceRow = dtSupplierInvoice.Rows[0];
         int supplierInvoiceId = int.Parse(supplierInvoiceRow["Id"].ToString());
         tbSupplierInvoiceId.Text = supplierInvoiceRow["Id"].ToString();
         tbSupplierInvoiceOriginalNo.Text = supplierInvoiceRow["SupplierOriNo"].ToString();
         tbPONo.Text = supplierInvoiceRow["POId"].ToString();
         tbPaymentDue.Text = ((decimal.Parse(supplierInvoiceRow["PaymentDue"].ToString())) - TotalPaid(supplierInvoiceId)).ToString("N");
     }
 }
Ejemplo n.º 4
0
 private void CategoryForm_Load(object sender, EventArgs e)
 {
     APCContext = new APCEntities();
     DataTable tableDt = new DataTable();
     tableDt.Columns.Add("Name");
     DataRow dr = tableDt.NewRow();
     dr["Name"] = "Supplier";
     DataRow dr1 = tableDt.NewRow();
     dr1["Name"] = "Client";
     DataRow dr2 = tableDt.NewRow();
     dr2["Name"] = "Workers";
     DataRow dr3 = tableDt.NewRow();
     dr3["Name"] = "Product";
     DataRow dr4 = tableDt.NewRow();
     dr4["Name"] = "PO";
     DataRow dr5 = tableDt.NewRow();
     dr5["Name"] = "SupplierInvoice";
     DataRow dr6 = tableDt.NewRow();
     dr6["Name"] = "Invoice";
     DataRow dr7 = tableDt.NewRow();
     dr7["Name"] = "Project";
     DataRow dr8 = tableDt.NewRow();
     dr8["Name"] = "Please select table";
     tableDt.Rows.Add(dr8);
     tableDt.Rows.Add(dr);
     tableDt.Rows.Add(dr1);
     tableDt.Rows.Add(dr2);
     tableDt.Rows.Add(dr3);
     tableDt.Rows.Add(dr4);
     tableDt.Rows.Add(dr5);
     tableDt.Rows.Add(dr6);
     tableDt.Rows.Add(dr7);
     comboBox1.DataSource = tableDt;
     comboBox1.DisplayMember = "Name";
     comboBox1.ValueMember = "Name";
     cbFields.DisplayMember = "column_name";
     cbFields.ValueMember = "DATA_TYPE";
 }
Ejemplo n.º 5
0
 private void ProjectForm_Load(object sender, EventArgs e)
 {
     APCContext = new APCEntities();
     cbClient.DataSource = APCContext.Client;
     cbClient.DisplayMember = "Name";
     cbClient.ValueMember = "Id";
 }
Ejemplo n.º 6
0
        private void InvoiceForm_Load(object sender, EventArgs e)
        {
            APCContext = new APCEntities();

            List<Project> projectList = BLProject.GetAllProject(APCContext);
            ddlProject.DataSource = projectList;
            ddlProject.DisplayMember = "Name";
            ddlProject.ValueMember = "Id";

            dgInvoiceProduct.AutoGenerateColumns = false;
            dgInvoiceProduct.DataSource = createInvoiceProductTable();
            //dgInvoiceProduct.Columns.Remove("Name");
            //dgInvoiceProduct.Columns.Remove("Kurs");
            //dgInvoiceProduct.Columns.Remove("SubCon");

            DataGridViewComboBoxColumn colName = BLHelper.ReturnDataGridComboBoxColumn("Name", "Name", "Name", "Name");
            colName.AutoSizeMode = DataGridViewAutoSizeColumnMode.NotSet;
            colName.DataSource = APCContext.Category;

            DataGridViewComboBoxColumn colKurs = BLHelper.ReturnDataGridComboBoxColumn("Name", "Name", "Name", "Name");
            colName.AutoSizeMode = DataGridViewAutoSizeColumnMode.NotSet;
            colKurs.DataSource = APCContext.Kurs;

            DataGridViewCheckBoxColumn colSubCon = BLHelper.ReturnDataGridCBColumn("SubCon");

            //dgInvoiceProduct.Columns.Insert(0, colName);
            //dgInvoiceProduct.Columns.Insert(5, colKurs);
            dgInvoiceProduct.Columns.Add(colName);
            dgInvoiceProduct.Columns.Add(colKurs);
            dgInvoiceProduct.Columns.Add(colSubCon);
        }
Ejemplo n.º 7
0
        private void Report_UsageForm_Load(object sender, EventArgs e)
        {
            APCContext = new APCEntities();

            ddlProject.DataSource = APCContext.Project;
            ddlProject.DisplayMember = "Name";
            ddlProject.ValueMember = "Id";

            ddlCategory.DataSource = APCContext.Category;
            ddlCategory.DisplayMember = "Name";
            ddlCategory.ValueMember = "Id";

            calFrom.Value = DateTime.Today.AddDays(-14);
            calTo.Value = DateTime.Today;
        }
Ejemplo n.º 8
0
 private void SupplierForm_Load(object sender, EventArgs e)
 {
     APCContext = new APCEntities();
 }
Ejemplo n.º 9
0
 private void WorkersForm_Load(object sender, EventArgs e)
 {
     APCContext = new APCEntities();
 }
Ejemplo n.º 10
0
 private void CategoryForm_Load(object sender, EventArgs e)
 {
     APCContext = new APCEntities();
 }
 private void Report_UsagePerProjectForm_Load(object sender, EventArgs e)
 {
     APCContext = new APCEntities();
     DataTable dt = ProjectArcon.DataLayer.Report.GetSummaryPerProject();
     dgProject.DataSource = GetTotalPerProject(dt);
 }
Ejemplo n.º 12
0
        private void Project_WorkersForm_Load(object sender, EventArgs e)
        {
            APCContext = new APCEntities();
            ddlWorker.DataSource = APCContext.Workers;
            ddlWorker.DisplayMember = "Name";
            ddlWorker.ValueMember = "Id";

            ddlProject.DataSource = APCContext.Project;
            ddlProject.DisplayMember = "Name";
            ddlProject.ValueMember = "Id";

            showWorkerSalary();
        }
        private void Project_WorkersForm_Load(object sender, EventArgs e)
        {
            APCContext = new APCEntities();

            ddlSearchWorkers.DataSource = APCContext.Workers;
            ddlSearchWorkers.DisplayMember = "Name";
            ddlSearchWorkers.ValueMember = "Id";

            ddlSearchProject.DataSource = APCContext.Project;
            ddlSearchProject.DisplayMember = "Name";
            ddlSearchProject.ValueMember = "Id";
        }
Ejemplo n.º 14
0
 private void SupplierInvoiceForm_Load(object sender, EventArgs e)
 {
     APCContext = new APCEntities();
     ddlPO.DataSource = BLPO.GetAllPO(APCContext);
     ddlPO.DisplayMember = "Id";
     ddlPO.ValueMember = "Id";
 }
Ejemplo n.º 15
0
 private void PaymentFromCustomerForm_Load(object sender, EventArgs e)
 {
     APCContext = new APCEntities();
 }
Ejemplo n.º 16
0
        private void POForm_Load(object sender, EventArgs e)
        {
            APCContext = new APCEntities();
            cbSupplier.DataSource = APCContext.Supplier;
            cbProject.DataSource = APCContext.Project;
            cbSupplier.DisplayMember = "Name";
            cbSupplier.ValueMember = "Id";
            cbProject.DisplayMember = "Name";
            cbProject.ValueMember = "Id";

            dgPOProduct.DataSource = createPOProductTable();
            dgPOProduct.Columns.Remove("Name");
            dgPOProduct.Columns.Remove("SubCon");

            DataGridViewComboBoxColumn colName = BLHelper.ReturnDataGridComboBoxColumn("Name", "Name", "Name", "Name");
            colName.DataSource = APCContext.Category;

            DataGridViewCheckBoxColumn colSubCon = BLHelper.ReturnDataGridCBColumn("SubCon");

            dgPOProduct.Columns.Insert(0, colName);
            dgPOProduct.Columns.Add(colSubCon);
        }