Ejemplo n.º 1
0
    private void ResetFields()
    {
        chkGenerateNewBarcodeCustomer.Visible = true;
        hypLookUpCustomer.Visible             = true;
        chkIsTransfer.Checked                 = false;
        lblBranch.Text                        = ddlFindBranch.SelectedItem.Text;
        lblContractNo.Text                    = "(Generated by System)";
        calDate.SelectedDate                  = DateTime.Today;
        calEffectiveDate.SelectedDate         = DateTime.Today;
        chkGenerateNewBarcodeCustomer.Checked = true;
        ddlPackage.SelectedIndex              = 0;
        ddlBillingType.SelectedIndex          = 0;
        ddlArea.SelectedIndex                 = 0;
        txtSchoolID.Text                      = txtSchoolName.Text = String.Empty;
        lblStatus.Text                        = "Pending";
        txtCustomerBarcode.ReadOnly           = false;
        gvwPackage.DataSource                 = null;
        gvwPackage.DataBind();
        btnVoid.Enabled              = false;
        lblActiveDate.Text           = "Not Active";
        calExpiredDate.Enabled       = false;
        calNextDuesDate.SelectedDate = calEffectiveDate.SelectedDate.AddMonths(1);
        WebFormHelper.ClearTextBox(txtFatherName, txtFatherPhone, txtHomePhone, txtIDCardNoFather, txtIDCardNoMother, txtMailingAddress, txtMailingZipCode, txtMotherName, txtMotherPhone, txtNotes, txtAddress, txtZipCode);
        chkFather.Checked = false;
        chkMother.Checked = false;
        chkFatherBirthDateUnknown.Checked = true;
        chkMotherBirthDateUnknown.Checked = true;
        ddlMonthlyDuesItem.SelectedIndex  = 0;
        ddlRenewalOrUpgrade.SelectedIndex = 0;

        lblClosedDate.Text = "(Generated by System)";
        lblVoidDate.Text   = "(Generated by System)";
    }
Ejemplo n.º 2
0
 protected void lnbAddNew_Click(object sender, EventArgs e)
 {
     mvwForm.SetActiveView(viwAddEdit);
     RowID = 0;
     WebFormHelper.ClearTextBox(txtDescription);
     txtDescription.Focus();
 }
Ejemplo n.º 3
0
        protected void lnbAddNew_Click(object sender, EventArgs e)
        {
            mvwForm.SetActiveView(viwAddEdit);
            RowID = 0;
            WebFormHelper.ClearTextBox(txtName, txtAddress, txtCode, txtEmail, txtMerchantCode, txtPhone);

            txtName.Focus();
        }
Ejemplo n.º 4
0
 protected void lnbAddNew_Click(object sender, EventArgs e)
 {
     RowID = 0;
     WebFormHelper.ClearTextBox(txtAccountNo, txtAccountDescription);
     ddlParentAccount.SelectedValue = "0";
     chkActive.Checked  = true;
     chkCascade.Checked = false;
     txtAccountNo.Focus();
 }
Ejemplo n.º 5
0
 protected void lnbAddNew_Click(object sender, EventArgs e)
 {
     mvwForm.SetActiveView(viwAddEdit);
     RowID = 0;
     WebFormHelper.ClearTextBox(txtBarcode, txtDescription, txtUnitPrice);
     ddlAccount.SelectedIndex  = 0;
     ddlItemType.SelectedIndex = 0;
     chkIsActive.Checked       = true;
     txtBarcode.Focus();
 }
Ejemplo n.º 6
0
 protected void lnbAddNew_Click(object sender, EventArgs e)
 {
     mvwParents.ActiveViewIndex = 1;
     RowID             = 0;
     imgPhoto.ImageUrl = ConfigurationManager.AppSettings[ApplicationSettingKeys.FolderPhotoPersons] + @"\default.png";
     WebFormHelper.ClearTextBox(txtEmail, txtName, txtPhone1, txtPhone2);
     ddlConnection.Enabled       = String.IsNullOrEmpty(Request.QueryString["PickUpPerson"]);
     ddlConnection.SelectedIndex = String.IsNullOrEmpty(Request.QueryString["PickUpPerson"]) ? 0 : 3;
     ddlConnection.Focus();
 }
Ejemplo n.º 7
0
 protected void lnbAddNew_Click(object sender, EventArgs e)
 {
     mvwForm.SetActiveView(viwAddEdit);
     RowID = 0;
     WebFormHelper.ClearTextBox(txtName, txtQuantity, txtUnitPrice);
     ddlItem.SelectedIndex = 0;
     Detail = new List <PackageDetailViewModel>();
     RefreshDetail();
     chkIsActive.Checked = true;
     txtName.Focus();
 }
Ejemplo n.º 8
0
 protected void lnbAddNew_Click(object sender, EventArgs e)
 {
     mvwForm.SetActiveView(viwAddEdit);
     RowID = 0;
     CalendarPopup1.SelectedDate = DateTime.Today;
     CalendarPopup2.SelectedDate = DateTime.Today.AddDays(7);
     chkActive.Checked           = true;
     chkInfinite.Checked         = false;
     txtSubject.Text             = txtDescription.Text = String.Empty;
     WebFormHelper.ClearTextBox(txtDescription);
     txtSubject.Focus();
 }
Ejemplo n.º 9
0
        protected void btnAddDetail_Click(object sender, EventArgs e)
        {
            try
            {
                if (String.IsNullOrEmpty(txtDiscount.Text))
                {
                    txtDiscount.Text = "0";
                }

                int  itemID = Convert.ToInt32(ddlItem.SelectedValue);
                Item item   = ItemService.Get(itemID);
                if (_InvoiceDetail.All(detail => detail.ItemID != itemID))
                {
                    _InvoiceDetail.Add(
                        new InvoiceDetailViewModel()
                    {
                        ID              = _InvoiceDetail.Any() ? _InvoiceDetail.Max(inv => inv.ID) + 1 : 1,
                        InvoiceID       = RowID,
                        ItemID          = item.ID,
                        ItemBarcode     = item.Barcode,
                        ItemDescription = item.Description,
                        Quantity        = Convert.ToInt32(txtQuantity.Text),
                        UnitName        = ddlUnit.SelectedItem.Text,
                        UnitPrice       = Convert.ToDecimal(txtUnitPrice.Text),
                        Discount        = Convert.ToDecimal(txtDiscount.Text),
                        IsTaxable       = chkIsTaxable.Checked,
                        NetAmount       = ((Convert.ToInt32(txtQuantity.Text) *
                                            Convert.ToDecimal(txtUnitPrice.Text) -
                                            (Convert.ToDecimal(txtDiscount.Text) / 100) *
                                            (Convert.ToInt32(txtQuantity.Text) *
                                             Convert.ToDecimal(txtUnitPrice.Text))) /
                                           (chkIsTaxable.Checked ? 1.1M : 1M)),
                        Total = (Convert.ToInt32(txtQuantity.Text) *
                                 Convert.ToDecimal(txtUnitPrice.Text) -
                                 (Convert.ToDecimal(txtDiscount.Text) / 100) * (Convert.ToInt32(txtQuantity.Text) *
                                                                                Convert.ToDecimal(txtUnitPrice.Text)))
                    });

                    WebFormHelper.ClearTextBox(txtQuantity, txtDiscount, txtUnitPrice);
                    ddlItemType.SelectedIndex   = 0;
                    ddlItem.SelectedIndex       = 0;
                    gvwOtherPurchase.DataSource = _InvoiceDetail;
                    gvwOtherPurchase.DataBind();
                    CalculateTotalInvoiceAndPayment();
                }
            }
            catch (Exception ex)
            {
                WebFormHelper.SetLabelTextWithCssClass(lblStatus, ex.Message, LabelStyleNames.ErrorMessage);
                LogService.ErrorException(GetType().FullName, ex);
            }
        }
Ejemplo n.º 10
0
 protected void lnbAddNew_Click(object sender, EventArgs e)
 {
     mvwForm.ActiveViewIndex = 1;
     RowID          = 0;
     lblBranch.Text = ddlFindBranch.SelectedItem.Text;
     WebFormHelper.ClearTextBox(txtCustomerCode, txtNotes);
     ddlDocumentType.Enabled       = true;
     ddlDocumentType.SelectedIndex = 0;
     calStartDate.SelectedDate     = DateTime.Today;
     calEndDate.SelectedDate       = DateTime.Today;
     btnApprove.Enabled            = false;
     btnVoid.Enabled        = false;
     lblApprovalStatus.Text = "Not Approved";
     lblDocumentNo.Text     = "(Generated by System)";
     hypPromptCustomer.Attributes["onclick"] = String.Format("showPromptPopUp('PromptCustomer.aspx?BranchID={0}', this.previousSibling.previousSibling.id, 550, 900);", ddlFindBranch.SelectedValue);
 }
Ejemplo n.º 11
0
    protected void lnbAddNew_Click(object sender, EventArgs e)
    {
        mvwForm.SetActiveView(viwAddEdit);
        RowID = 0;

        ResetFields();

        btnVoid.Enabled          = false;
        btnCloseContract.Enabled = false;
        chkIsTransfer.Enabled    = true;

        calDateOfBirth.SelectedDate = DateTime.Today;

        WebFormHelper.ClearTextBox(txtNotes, txtCustomerBarcode, txtCustomerFirstName, txtCustomerLastName, txtDuesAmount,
                                   txtFatherEmail, txtFatherName, txtFatherPhone, txtMotherEmail, txtMotherName, txtMotherPhone, txtBillingCardHolderID, txtBillingCardHolderName, txtBillingCardNo);
    }
Ejemplo n.º 12
0
    protected void btnAddDetail_Click(object sender, EventArgs e)
    {
        try
        {
            if (String.IsNullOrEmpty(txtDiscount.Text))
            {
                txtDiscount.Text = "0";
            }

            int  itemID = Convert.ToInt32(ddlItem.SelectedValue);
            Item item   = itemProvider.Get(itemID);
            _InvoiceDetail.Add(
                new InvoiceDetailViewModel()
            {
                ID              = _InvoiceDetail.Any() ? _InvoiceDetail.Max(inv => inv.ID) + 1 : 1,
                InvoiceID       = RowID,
                ItemID          = item.ID,
                ItemBarcode     = item.Barcode,
                ItemDescription = item.Description,
                Quantity        = Convert.ToInt32(txtQuantity.Text),
                UnitPrice       = Convert.ToDecimal(txtUnitPrice.Text),
                Discount        = Convert.ToDecimal(txtDiscount.Text),
                IsTaxable       = chkIsTaxable.Checked,
                NetAmount       = ((Convert.ToInt32(txtQuantity.Text) *
                                    Convert.ToDecimal(txtUnitPrice.Text) -
                                    (Convert.ToDecimal(txtDiscount.Text) / 100) * (Convert.ToInt32(txtQuantity.Text) *
                                                                                   Convert.ToDecimal(txtUnitPrice.Text))) /
                                   (chkIsTaxable.Checked ? 1.1M : 1M)),
                Total = (Convert.ToInt32(txtQuantity.Text) *
                         Convert.ToDecimal(txtUnitPrice.Text) -
                         (Convert.ToDecimal(txtDiscount.Text) / 100) * (Convert.ToInt32(txtQuantity.Text) *
                                                                        Convert.ToDecimal(txtUnitPrice.Text)))
            });
            WebFormHelper.ClearTextBox(txtQuantity, txtDiscount, txtUnitPrice);
            ddlItemType.SelectedIndex   = 0;
            ddlItem.SelectedIndex       = 0;
            gvwOtherPurchase.DataSource = _InvoiceDetail;
            gvwOtherPurchase.DataBind();
            tsmScriptManager.SetFocus(ddlItem);
            CalculateTotalInvoiceAndPayment();
        }
        catch
        {
        }
    }
Ejemplo n.º 13
0
    protected void btnAddDetail_Click(object sender, EventArgs e)
    {
        int  id           = Detail.Any() ? Detail.Max(row => row.ID) + 1 : 1;
        Item selectedItem = itemProvider.Get(Convert.ToInt32(ddlItem.SelectedValue));

        Detail.Add(
            new PackageDetailViewModel()
        {
            ID              = id,
            ItemBarcode     = selectedItem.Barcode,
            ItemDescription = selectedItem.Description,
            ItemID          = selectedItem.ID,
            Quantity        = Convert.ToInt32(txtQuantity.Text),
            UnitPrice       = Convert.ToDecimal(txtUnitPrice.Text)
        });
        WebFormHelper.ClearTextBox(txtQuantity, txtUnitPrice);
        ddlItem.SelectedIndex = 0;
        gvwDetail.DataSource  = Detail;
        gvwDetail.DataBind();
    }
Ejemplo n.º 14
0
 protected void btnAddPayment_Click(object sender, EventArgs e)
 {
     _PaymentDetail.Add(
         new PaymentDetailViewModel()
     {
         ID               = _PaymentDetail.Any() ? _PaymentDetail.Max(pay => pay.ID) + 1 : 1,
         PaymentTypeID    = Convert.ToInt32(ddlPaymentType.SelectedValue),
         PaymentType      = ddlPaymentType.SelectedItem.Text,
         CreditCardTypeID = String.IsNullOrEmpty(ddlCreditCardType.SelectedItem.Value) ? (int?)null : Convert.ToInt32(ddlCreditCardType.SelectedValue),
         CreditCardType   = ddlCreditCardType.SelectedItem.Text,
         ApprovalCode     = txtApprovalCode.Text,
         Notes            = txtPaymentNotes.Text,
         Amount           = Convert.ToDecimal(txtPaymentAmount.Text)
     });
     txtPaymentNotes.Text  = String.Empty;
     gvwPayment.DataSource = _PaymentDetail;
     gvwPayment.DataBind();
     WebFormHelper.ClearTextBox(txtPaymentAmount, txtApprovalCode);
     CalculateTotalInvoiceAndPayment();
 }
 protected void lnbAddNew_Click(object sender, EventArgs e)
 {
     RowID = 0;
     mypPeriode.SelectedDate = DateTime.Today;
     mvwForm.ActiveViewIndex = 1;
     WebFormHelper.ClearTextBox(
         txtFreshMemberUnit,
         txtFreshMemberRevenue,
         txtRenewalUnit,
         txtRenewalRevenue,
         txtUpgradeUnit,
         txtUpgradeRevenue,
         txtVocalRevenue,
         txtPilatesRevenue,
         txtOtherRevenue,
         txtFreezeFees,
         txtFreezeUnit,
         txtEFTCollectionRevenue,
         txtDropOffUnit,
         txtCancelFees);
 }
Ejemplo n.º 16
0
 protected void btnAddPayment_Click(object sender, EventArgs e)
 {
     if (Convert.ToInt32(ddlPaymentType.SelectedValue) > 0)
     {
         _PaymentDetail.Add(
             new PaymentDetailViewModel()
         {
             ID               = _PaymentDetail.Any() ? _PaymentDetail.Max(pay => pay.ID) + 1 : 1,
             PaymentTypeID    = Convert.ToInt32(ddlPaymentType.SelectedValue),
             PaymentType      = ddlPaymentType.SelectedItem.Text,
             CreditCardTypeID = ddlCreditCardType.SelectedValue.ToDefaultNumber <int>() == 0 ? (int?)null : ddlCreditCardType.SelectedValue.ToDefaultNumber <int>(),
             CreditCardType   = ddlCreditCardType.SelectedItem.Text,
             ApprovalCode     = txtApprovalCode.Text,
             Amount           = Convert.ToDecimal(txtPaymentAmount.Text),
             Notes            = txtPaymentNotes.Text
         });
         gvwPayment.DataSource = _PaymentDetail;
         gvwPayment.DataBind();
         WebFormHelper.ClearTextBox(txtPaymentAmount, txtApprovalCode);
         CalculateTotalPayment();
     }
 }