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)"; }
protected void lnbAddNew_Click(object sender, EventArgs e) { mvwForm.SetActiveView(viwAddEdit); RowID = 0; WebFormHelper.ClearTextBox(txtDescription); txtDescription.Focus(); }
protected void lnbAddNew_Click(object sender, EventArgs e) { mvwForm.SetActiveView(viwAddEdit); RowID = 0; WebFormHelper.ClearTextBox(txtName, txtAddress, txtCode, txtEmail, txtMerchantCode, txtPhone); txtName.Focus(); }
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(); }
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(); }
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(); }
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(); }
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(); }
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); } }
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); }
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); }
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 { } }
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(); }
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); }
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(); } }