Exemple #1
0
        /*******************************************************************************************************/
        #region METHODS

        #endregion METHODS
        /*******************************************************************************************************/
        #region OVERRIDE METHODS

        protected override void setupFields()
        {
            Settings.setGeneralSettings(this);

            setColumnsDataPropertyNames(CustomerTerm.COL_DB_ID, CustomerTerm.COL_DB_ACTIVE, null, null, null, null);
            col_dgv_Customers_Name     = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_Customers_Name", iddl_Customers.LabelText, CustomerTerm.COL_CUSTOMERS_NAME, true, true, "", true, false, 100, DataGridViewContentAlignment.MiddleLeft);
            col_dgv_DebtLimit          = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_DebtLimit", in_DebtLimit.LabelText, CustomerTerm.COL_DB_DEBTLIMIT, true, true, "N0", false, false, 100, DataGridViewContentAlignment.MiddleRight);
            col_dgv_TermDays           = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_TermDays", in_TermDays.LabelText, CustomerTerm.COL_DB_TERMDAYS, true, true, "N0", false, false, 50, DataGridViewContentAlignment.MiddleRight);
            col_dgv_Notes              = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_Notes", itxt_Notes.LabelText, CustomerTerm.COL_DB_NOTES, true, true, "", true, true, null, DataGridViewContentAlignment.MiddleLeft);
            col_dgv_Notes.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            col_dgv_Checked            = base.addColumn <DataGridViewCheckBoxCell>(dgv, "col_dgv_Checked", "OK", CustomerTerm.COL_DB_Checked, true, true, "", true, false, 30, DataGridViewContentAlignment.MiddleLeft);

            Customer.populateDropDownList(iddl_Customers.Dropdownlist.combobox, false, true);

            InputToDisableOnSearch.Add(in_DebtLimit);
            InputToDisableOnSearch.Add(in_TermDays);

            InputToDisableOnUpdate.Add(iddl_Customers);

            ptInputPanel.PerformClick();
        }
        /*******************************************************************************************************/
        #region OVERRIDE METHODS

        protected override void setupFields()
        {
            Settings.setGeneralSettings(this);

            setColumnsDataPropertyNames(FakturPajak.COL_DB_Id, null, null, null, null, FakturPajak.COL_DB_Completed);
            col_dgv_Checkbox1.HeaderText = "Lock";

            col_dgv_No               = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_No", "No", FakturPajak.COL_DB_No, true, true, "", true, false, 20, DataGridViewContentAlignment.MiddleLeft);
            col_dgv_Timestamp        = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_Timestamp", idtp_Timestamp.LabelText, FakturPajak.COL_DB_Timestamp, true, true, "dd/MM/yy", false, false, 40, DataGridViewContentAlignment.MiddleLeft);
            col_dgv_Vendors_Id       = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_Vendors_Id", "Vendors_Id", FakturPajak.COL_DB_Vendors_Id, true, false, "", false, false, 50, DataGridViewContentAlignment.MiddleLeft);
            col_dgv_Vendors_Name     = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_Vendors_Name", iddl_Vendors.LabelText, FakturPajak.COL_Vendors_Name, true, true, "", true, false, 50, DataGridViewContentAlignment.MiddleLeft);
            col_dgv_Customers_Id     = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_Customers_Id", "Customers_Id", FakturPajak.COL_DB_Customers_Id, true, false, "", false, false, 50, DataGridViewContentAlignment.MiddleLeft);
            col_dgv_Customers_Name   = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_Customers_Name", iddl_Customers.LabelText, FakturPajak.COL_Customers_Name, true, true, "", true, false, 55, DataGridViewContentAlignment.MiddleLeft);
            col_dgv_DPP              = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_DPP", in_DPP.LabelText, FakturPajak.COL_DB_DPP, true, true, "N2", false, false, 30, DataGridViewContentAlignment.MiddleRight);
            col_dgv_PPN              = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_PPN", in_PPN.LabelText, FakturPajak.COL_DB_PPN, true, true, "N2", false, false, 30, DataGridViewContentAlignment.MiddleRight);
            col_dgv_TotalAmount      = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_TotalAmount", "Total", FakturPajak.COL_TotalAmount, true, true, "N2", false, false, 30, DataGridViewContentAlignment.MiddleRight);
            col_dgv_AssignedAmount   = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_AssignedAmount", "Assigned", FakturPajak.COL_AssignedAmount, true, true, "N2", false, false, 50, DataGridViewContentAlignment.MiddleRight);
            col_dgv_AmountDifference = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_MissingAmount", "Diff", FakturPajak.COL_AmountDifference, true, true, "N2", false, false, 40, DataGridViewContentAlignment.MiddleRight);
            Util.updateForeColor(col_dgv_AmountDifference, Color.Red);
            Util.updateFontStyle(col_dgv_AmountDifference, FontStyle.Bold);

            col_dgv_Notes = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_Notes", itxt_Notes.LabelText, FakturPajak.COL_DB_Notes, true, true, "", true, false, 30, DataGridViewContentAlignment.MiddleLeft);
            col_dgv_Notes.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            gridSaleInvoices.AutoGenerateColumns                   = false;
            gridSaleInvoices.SelectionMode                         = DataGridViewSelectionMode.FullRowSelect;
            col_gridSaleInvoices_hexbarcode.DataPropertyName       = Sale.COL_HEXBARCODE;
            col_gridSaleInvoices_ReceivableAmount.DataPropertyName = Sale.COL_RECEIVABLEAMOUNT;
            col_gridSaleInvoices_returnedamount.DataPropertyName   = Sale.COL_RETURNEDAMOUNT;
            col_gridSaleInvoices_SaleAmount.DataPropertyName       = Sale.COL_SALEAMOUNT;
            col_gridSaleInvoices_Sales_id.DataPropertyName         = Sale.COL_ID;
            col_gridSaleInvoices_sale_length.DataPropertyName      = Sale.COL_SALELENGTH;
            col_gridSaleInvoices_sale_qty.DataPropertyName         = Sale.COL_SALEQTY;
            col_gridSaleInvoices_shippingcost.DataPropertyName     = Sale.COL_DB_SHIPPINGCOST;
            col_gridSaleInvoices_timestamp.DataPropertyName        = Sale.COL_DB_Timestamp;

            gridReturns.AutoGenerateColumns = false;
            gridReturns.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
            col_gridReturns_customer_name.DataPropertyName = SaleReturn.COL_Customers_Name;
            col_gridReturns_hexbarcode.DataPropertyName    = SaleReturn.COL_HEXBARCODE;
            col_gridReturns_id.DataPropertyName            = SaleReturn.COL_ID;
            col_gridReturns_sale_amount.DataPropertyName   = SaleReturn.COL_RETURNAMOUNT;
            col_gridReturns_sale_length.DataPropertyName   = SaleReturn.COL_SaleLength;
            col_gridReturns_sale_qty.DataPropertyName      = SaleReturn.COL_SaleQty;
            col_gridReturns_Timestamp.DataPropertyName     = SaleReturn.COL_DB_Timestamp;

            gridVendorInvoices.AutoGenerateColumns                = false;
            gridVendorInvoices.SelectionMode                      = DataGridViewSelectionMode.FullRowSelect;
            col_gridvendorinvoice_id.DataPropertyName             = VendorInvoice.COL_DB_Id;
            col_gridvendorinvoice_timestamp.DataPropertyName      = VendorInvoice.COL_DB_Timestamp;
            col_gridvendorinvoice_invoiceno.DataPropertyName      = VendorInvoice.COL_DB_InvoiceNo;
            col_gridvendorinvoice_vendorname.DataPropertyName     = VendorInvoice.COL_VendorName;
            col_gridvendorinvoice_statusenumid.DataPropertyName   = VendorInvoice.COL_DB_StatusEnumID;
            col_gridvendorinvoice_statusname.DataPropertyName     = VendorInvoice.COL_StatusName;
            col_gridvendorinvoice_Amount.DataPropertyName         = VendorInvoice.COL_DB_Amount;
            col_gridvendorinvoice_notes.DataPropertyName          = VendorInvoice.COL_DB_Notes;
            col_gridvendorinvoice_notes.DefaultCellStyle.WrapMode = DataGridViewTriState.True;

            idtp_Timestamp.Value = DateTime.Now;
            Customer.populateInputControlDropDownList(iddl_Customers, true);
            Vendor.populateInputControlDropDownList(iddl_Vendors, true);

            idtp_MonthFilter.ResetValue = idtp_MonthFilter.getFirstDateOfLastMonth();
            idtp_MonthFilter.Checked    = false;
            idtp_MonthFilter.reset();

            rbVendor.Checked = true;
            setRadioButtonEnability(rbVendor);

            tcRowInfo.TabPages.Clear();

            InputToDisableOnAdd.Add(idtp_MonthFilter);

            InputToDisableOnUpdate.Add(idtp_MonthFilter);

            InputToDisableOnSearch.Add(idtp_Timestamp);
            InputToDisableOnSearch.Add(in_PPN);
            InputToDisableOnSearch.Add(in_DPP);
            InputToDisableOnSearch.Add(itxt_Notes);
        }
        /*******************************************************************************************************/
        #region OVERRIDE METHODS

        protected override void setupFields()
        {
            Settings.setGeneralSettings(this);

            setColumnsDataPropertyNames(Kontrabon.COL_DB_Id, null, null, null, null, Kontrabon.COL_DB_Approved);
            col_dgv_Checkbox1.HeaderText = "Lock";

            col_dgv_No               = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_No", "No", Kontrabon.COL_DB_No, true, true, "", true, false, 20, DataGridViewContentAlignment.MiddleLeft);
            col_dgv_Timestamp        = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_Timestamp", idtp_Timestamp.LabelText, Kontrabon.COL_DB_Timestamp, true, true, "", false, false, 40, DataGridViewContentAlignment.MiddleLeft);
            col_dgv_Customers_Id     = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_Customers_Id", "Customers_Id", Kontrabon.COL_DB_Customers_Id, true, false, "", false, false, 50, DataGridViewContentAlignment.MiddleLeft);
            col_dgv_Customers_Name   = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_Customers_Name", iddl_Customers.LabelText, Kontrabon.COL_Customers_Name, true, true, "", true, false, 55, DataGridViewContentAlignment.MiddleLeft);
            col_dgv_Amount           = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_Amount", in_Amount.LabelText, Kontrabon.COL_DB_Amount, true, true, "N2", false, false, 50, DataGridViewContentAlignment.MiddleRight);
            col_dgv_ReturnDate       = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_ReturnDate", "Return", Kontrabon.COL_DB_ReturnDate, true, true, "", false, false, 40, DataGridViewContentAlignment.MiddleLeft);
            col_dgv_AssignedAmount   = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_AssignedAmount", "Assigned", Kontrabon.COL_AssignedAmount, true, true, "N2", false, false, 50, DataGridViewContentAlignment.MiddleRight);
            col_dgv_AmountDifference = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_MissingAmount", "Diff", Kontrabon.COL_AmountDifference, true, true, "N2", false, false, 40, DataGridViewContentAlignment.MiddleRight);
            Util.updateForeColor(col_dgv_AmountDifference, Color.Red);
            Util.updateFontStyle(col_dgv_AmountDifference, FontStyle.Bold);

            col_dgv_Notes = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_Notes", itxt_Notes.LabelText, FakturPajak.COL_DB_Notes, true, true, "", true, false, 30, DataGridViewContentAlignment.MiddleLeft);
            col_dgv_Notes.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            gridFakturPajaks.AutoGenerateColumns            = false;
            gridFakturPajaks.SelectionMode                  = DataGridViewSelectionMode.FullRowSelect;
            col_gridFakturPajaks_Id.DataPropertyName        = FakturPajak.COL_DB_Id;
            col_gridFakturPajaks_No.DataPropertyName        = FakturPajak.COL_DB_No;
            col_gridFakturPajaks_Timestamp.DataPropertyName = FakturPajak.COL_DB_Timestamp;
            col_gridFakturPajaks_DPP.DataPropertyName       = FakturPajak.COL_DB_DPP;
            col_gridFakturPajaks_PPN.DataPropertyName       = FakturPajak.COL_DB_PPN;
            col_gridFakturPajaks_Amount.DataPropertyName    = FakturPajak.COL_TotalAmount;
            col_gridFakturPajaks_Notes.DataPropertyName     = FakturPajak.COL_DB_Notes;

            gridSaleInvoices.AutoGenerateColumns                   = false;
            gridSaleInvoices.SelectionMode                         = DataGridViewSelectionMode.FullRowSelect;
            col_gridSaleInvoices_hexbarcode.DataPropertyName       = Sale.COL_HEXBARCODE;
            col_gridSaleInvoices_ReceivableAmount.DataPropertyName = Sale.COL_RECEIVABLEAMOUNT;
            col_gridSaleInvoices_returnedamount.DataPropertyName   = Sale.COL_RETURNEDAMOUNT;
            col_gridSaleInvoices_SaleAmount.DataPropertyName       = Sale.COL_SALEAMOUNT;
            col_gridSaleInvoices_Sales_id.DataPropertyName         = Sale.COL_ID;
            col_gridSaleInvoices_sale_length.DataPropertyName      = Sale.COL_SALELENGTH;
            col_gridSaleInvoices_sale_qty.DataPropertyName         = Sale.COL_SALEQTY;
            col_gridSaleInvoices_shippingcost.DataPropertyName     = Sale.COL_DB_SHIPPINGCOST;
            col_gridSaleInvoices_timestamp.DataPropertyName        = Sale.COL_DB_Timestamp;

            gridReturns.AutoGenerateColumns = false;
            gridReturns.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
            col_gridReturns_customer_name.DataPropertyName = SaleReturn.COL_Customers_Name;
            col_gridReturns_hexbarcode.DataPropertyName    = SaleReturn.COL_HEXBARCODE;
            col_gridReturns_id.DataPropertyName            = SaleReturn.COL_ID;
            col_gridReturns_sale_amount.DataPropertyName   = SaleReturn.COL_RETURNAMOUNT;
            col_gridReturns_sale_length.DataPropertyName   = SaleReturn.COL_SaleLength;
            col_gridReturns_sale_qty.DataPropertyName      = SaleReturn.COL_SaleQty;
            col_gridReturns_Timestamp.DataPropertyName     = SaleReturn.COL_DB_Timestamp;

            idtp_Timestamp.Value  = DateTime.Now;
            idtp_ReturnDate.Value = DateTime.Now;
            Customer.populateInputControlDropDownList(iddl_Customers, true);

            idtp_StartDate.Value   = DateTime.Now.AddMonths(-3);
            idtp_EndDate.Value     = DateTime.Now;
            idtp_StartDate.Checked = false;
            idtp_EndDate.Checked   = false;

            InputToDisableOnAdd.Add(idtp_StartDate);
            InputToDisableOnAdd.Add(idtp_EndDate);

            InputToDisableOnUpdate.Add(idtp_StartDate);
            InputToDisableOnUpdate.Add(idtp_EndDate);

            InputToDisableOnSearch.Add(idtp_Timestamp);
            InputToDisableOnSearch.Add(in_Amount);
            InputToDisableOnSearch.Add(idtp_ReturnDate);
            InputToDisableOnSearch.Add(itxt_Notes);
        }