protected override Boolean isInputFieldsValid() { if (string.IsNullOrEmpty(_inputTxtName.TextValue)) { return(_inputTxtName.TextError("Please provide name")); } else if ((Mode != FormMode.Update && Grade.isNameExist(_inputTxtName.TextValue, null)) || (Mode == FormMode.Update && Grade.isNameExist(_inputTxtName.TextValue, selectedRowID()))) { return(_inputTxtName.TextError("Name is already in the list")); } return(true); }
protected override Boolean isInputFieldsValid() { if (_inputTxtStorageName.isEmpty()) { return(_inputTxtStorageName.TextError("Please enter storage name")); } else if (_inputTxtVendorName.isEmpty()) { return(_inputTxtVendorName.TextError("Please enter vendor name")); } else if (_inputTxtDescription.isEmpty()) { return(_inputTxtDescription.TextError("Please enter description")); } else if (!string.IsNullOrWhiteSpace(_inputTxtPricePerUnit.TextValue) && !Tools.isNumeric(_inputTxtPricePerUnit.TextValue)) { return(_inputTxtPricePerUnit.TextError("Invalid Buy Price Per Unit")); } else if (!string.IsNullOrWhiteSpace(_inputTxtSellPricePerUnit.TextValue) && !Tools.isNumeric(_inputTxtSellPricePerUnit.TextValue)) { return(_inputTxtSellPricePerUnit.TextError("Invalid Sell Price Per Unit")); } return(true); }
protected override Boolean isInputFieldsValid() { if (string.IsNullOrEmpty(_inputTxtName.TextValue)) { return(_inputTxtName.TextError("Please provide name")); } else if ((Mode != FormMode.Update && GordenItem.isNameExist(_inputTxtName.TextValue, null)) || (Mode == FormMode.Update && GordenItem.isNameExist(_inputTxtName.TextValue, selectedRowID()))) { return(_inputTxtName.TextError("Name is already in the list")); } else if (_inputDDLCategories.SelectedValue == null) { return(_inputDDLCategories.SelectedValueError("Please select category")); } else if (_inputDDLVendors.SelectedValue == null) { return(_inputDDLVendors.SelectedValueError("Please select vendor")); } else if (_inputDDLRetailLengthUnits.SelectedValue == null) { return(_inputDDLRetailLengthUnits.SelectedValueError("Please select retail unit")); } else if (_inputDDLBulkLengthUnits.SelectedValue == null) { return(_inputDDLBulkLengthUnits.SelectedValueError("Please select bulk unit")); } else if (!string.IsNullOrWhiteSpace(_inputTxtBuyRetailPricePerUnit.TextValue) && !Tools.isNumeric(_inputTxtBuyRetailPricePerUnit.TextValue)) { return(_inputTxtBuyRetailPricePerUnit.TextError("Invalid Buy Retail Price Per Unit")); } else if (!string.IsNullOrWhiteSpace(_inputTxtBuyBulkPricePerUnit.TextValue) && !Tools.isNumeric(_inputTxtBuyBulkPricePerUnit.TextValue)) { return(_inputTxtBuyBulkPricePerUnit.TextError("Invalid Buy Bulk Price Per Unit")); } else if (!string.IsNullOrWhiteSpace(_inputTxtSellRetailPricePerUnit.TextValue) && !Tools.isNumeric(_inputTxtSellRetailPricePerUnit.TextValue)) { return(_inputTxtSellRetailPricePerUnit.TextError("Invalid Sell Retail Price Per Unit")); } else if (!string.IsNullOrWhiteSpace(_inputTxtSellBulkPricePerUnit.TextValue) && !Tools.isNumeric(_inputTxtSellBulkPricePerUnit.TextValue)) { return(_inputTxtSellBulkPricePerUnit.TextError("Invalid Sell Bulk Price Per Unit")); } return(true); }
protected override Boolean isInputFieldsValid() { if (_inputDDLProducts.SelectedValue == null) { return(_inputDDLProducts.SelectedValueError("Please select product")); } else if (_inputDDLGrades.SelectedValue == null) { return(_inputDDLGrades.SelectedValueError("Please select grade")); } else if (_inputDDLProductWidths.SelectedValue == null) { return(_inputDDLProductWidths.SelectedValueError("Please select width")); } else if (_inputDDLLengthUnits.SelectedValue == null) { return(_inputDDLLengthUnits.SelectedValueError("Please select unit")); } else if (_inputDDLColors.SelectedValue == null) { return(_inputDDLColors.SelectedValueError("Please select color")); } else if ((Mode != FormMode.Update && InventoryStockLevel.isCombinationExist(null, (Guid)_inputDDLGrades.SelectedValue, (Guid)_inputDDLProducts.SelectedValue, (Guid)_inputDDLProductWidths.SelectedValue, (Guid)_inputDDLLengthUnits.SelectedValue, (Guid)_inputDDLColors.SelectedValue)) || (Mode == FormMode.Update && InventoryStockLevel.isCombinationExist(selectedRowID(), (Guid)_inputDDLGrades.SelectedValue, (Guid)_inputDDLProducts.SelectedValue, (Guid)_inputDDLProductWidths.SelectedValue, (Guid)_inputDDLLengthUnits.SelectedValue, (Guid)_inputDDLColors.SelectedValue))) { return(_inputDDLProducts.SelectedValueError("Combination is already in the list")); } else if (!Tools.isNumeric(_inputTxtOrderLotQty.TextValue)) { return(_inputTxtQty.TextError("Invalid qty. Harus lebih dari 0.")); } else if (!string.IsNullOrEmpty(_inputTxtQty.TextValue) && !Tools.isNumeric(_inputTxtQty.TextValue)) { return(_inputTxtQty.TextError("Invalid qty")); } return(true); }