private string ValidateHeaderControlles() { string ValidateMessage = string.Empty; if (DataGridDetails.Rows.Count <= 0) { return("Please add atleast one product to sale"); } if (DropDownPaymentType.SelectedIndex <= 0) { DropDownPaymentType.Focus(); return("Please select the Payment Type."); } if (string.IsNullOrEmpty(TxtCustomerName.Text.ToString())) { TxtCustomerName.Focus(); return("Please enter the Customer Name"); } if (string.IsNullOrEmpty(TxtCustomerMobileNo.Text.ToString())) { TxtCustomerMobileNo.Focus(); return("Please enter the Customer Mobile Number"); } if (string.IsNullOrEmpty(TxtPaidAmount.Text.ToString())) { TxtPaidAmount.Focus(); return("Please enter the Paid amount"); } return(ValidateMessage); }
private void ClearValues() { try { sCustomerTypeId = ClassProperty.IsCusType; sCustomerGroupId = ClassProperty.CustomerGroupId; sCustomerId = 0; sNetTotal = 0; TxtCustomerName.Select(); TxtCustomerName.Text = ""; TxtCustomerAddress.Text = ""; TxtLicensePlate.Text = ""; TxtPhone.Text = ""; sCustomerCode = ""; sCustomerName = ""; stCustomerCode = ""; stCustomerName = ""; _IsDefault = false; SpinNetTotal.ReadOnly = true; BtnAdjust.Enabled = false; BtnSaveAdjust.Enabled = false; GenCustomerCode(); LoadCustomerPrices(0); SetDefaultCustomer(false); } catch (Exception ex) { XtraMessageBox.Show(ex.Message); } }
private void Reset() { TxtCustomerName.Clear(); TxtBookName.Clear(); TxtManegerName.Clear(); FillOrder(); }
private void Clear() { TxtCustomerName.Clear(); TxtCustomerSurname.Clear(); TxtCustomerPhone.Clear(); TxtCustomerEmail.Clear(); TxtCustomerIdNumber.Clear(); }
// TextBox Reset private void Reset() { TxtCustomerName.Clear(); TxtCustomerPhone.Clear(); TxtCustomerSurname.Clear(); DtpBirthday.SelectedDate = null; BtnCreate.Visibility = Visibility.Visible; BtnUpdate.Visibility = Visibility.Hidden; BtnDelete.Visibility = Visibility.Hidden; FillCustomers(); }
private void BtnSave_Click(object sender, EventArgs e) { // 16 5 : สิทธิ์ใช้งานหน้าสมาชิก บันทึกข้อมูลสมาชิก int AuthorizeId = 16; if (SQLAuthorized.CheckAuthorized(ClassProperty.permisRoleId, AuthorizeId) == false) { SQLAuthorized.AlertAuthorized("สิทธิ์ใช้งานหน้าสมาชิก", "ไม่มีสิทธิ์บันทึกข้อมูลสมาชิก"); return; } if (stCustomerTypeId == 0) { XtraMessageBox.Show("กรุณาระบุประเภทลูกค้า !", "คำเตือน", MessageBoxButtons.OK, MessageBoxIcon.Warning); LkCustomerTypes.ShowPopup(); return; } if (LkCustomerGroup.EditValue == null) { XtraMessageBox.Show("กรุณาระบุกลุ่มลูกค้า !", "คำเตือน", MessageBoxButtons.OK, MessageBoxIcon.Warning); LkCustomerGroup.ShowPopup(); return; } if (TxtCustomerName.Text.Trim() == string.Empty) { XtraMessageBox.Show("กรุณาระบุชื่อลูกค้า !", "คำเตือน", MessageBoxButtons.OK, MessageBoxIcon.Warning); TxtCustomerName.Focus(); return; } sCustomerCode = TxtCustomerCode.Text; sCustomerName = TxtCustomerName.Text; if (SaveData() == true) { LoadCustomer(); GridViewCustomer.FocusedRowHandle = GridViewCustomer.LocateByValue("CustomerName", TxtCustomerName.Text); sCustomerId = Convert.ToInt32(GridViewCustomer.GetFocusedRowCellValue("CustomerId")); if (CheckCustomerPrice(sCustomerId)) { GetData(sCustomerId); } } }
private void Reset() { TxtCustomerName.Clear(); TxtCustomerPhone.Clear(); FillCustomer(); }
public void BtnGetQuote_Click(object sender, EventArgs e) { String DeliveryTest = CmbDelivery.Text; String NameTest = TxtCustomerName.Text; if (DeliveryTest == "") { MessageBox.Show("Please select a shipping option"); } else if (NameTest == "") { MessageBox.Show("Please enter something in the Customer Name field"); } else { var desk = new Desk { Depth = NumDepth.Value, Width = NumWidth.Value, Drawers = (int)NumDrawers.Value, DesktopMaterial = (DesktopMaterial)CmbSurfaceMaterial.SelectedValue }; DeskQuote deskQuote = new DeskQuote { Desk = desk, CustomerName = TxtCustomerName.Text, QuoteDate = DateTime.Now, Shipping = (Delivery)CmbDelivery.SelectedValue }; deskQuote.Total = deskQuote.GetQuote(); AddQuoteToFile(deskQuote); //Serialize deskQuote into a string //Write deskQuote to JSON file var displayQuote = new DisplayQuote(_mainMenu, deskQuote); displayQuote.Show(); this.Close(); } try { String nameTest = TxtCustomerName.ToString(); } catch (Exception x) { Console.WriteLine(x.Message); } }