public string this[string columnName] { get { if (columnName == "TerminationReason") { if (string.IsNullOrEmpty(TerminationReason)) { return("Termination reason is required"); } } if (columnName == "TerminationDate") { if (string.IsNullOrEmpty(TerminationDate.ToString())) { return("Termination date is required"); } } if (columnName == "EffectiveDate") { if (string.IsNullOrEmpty(EffectiveDate.ToString())) { return("Effective date is required"); } } if (columnName == "ActionTakenBy") { if (string.IsNullOrEmpty(ActionTakenBy)) { return("Action taken by is required"); } } return(string.Empty); } }
internal void UpdateData(DataRow row) { row.ItemArray = new object[] { (IsNewItem) ? null : (object)Id, Code ?? string.Empty, Text ?? string.Empty, Count, FinalCount, ReceiveDate.ToString(), EstimatedDate.ToString(), TerminationDate.ToString(), Status }; }
internal PayrollRequest TerminateEmployeeRequest(PayrollEncoder encoder, object[] args) { var requestBody = new JsonDoc() .Set("ClientCode", encoder.Encode(ClientCode)) .Set("EmployeeId", EmployeeId) .Set("TerminationDate", TerminationDate?.ToString("MM/dd/yyyy")) .Set("TerminationReasonId", TerminationReasonId) .Set("InactivateDirectDepositAccounts", DeactivateAccounts ? 1 : 0) .ToString(); return(new PayrollRequest { Endpoint = @"/api/pos/employee/TerminateEmployee", RequestBody = requestBody }); }
public override String EvaluateDataBinding(Structures.DataBinding dataBinding) { String dataValue = String.Empty; String bindingContextPart = dataBinding.BindingContext.Split('.')[0]; switch (bindingContextPart) { case "EntityAddressId": dataValue = entityAddressId.ToString(); break; case "AddressType": dataValue = ((Int32)AddressType).ToString(); break; case "AddressTypeDescription": dataValue = AddressTypeDescription; break; case "EffectiveDate": dataValue = EffectiveDate.ToString("MM/dd/yyyy"); break; case "TerminationDate": dataValue = TerminationDate.ToString("MM/dd/yyyy"); break; case "Line1": dataValue = Line1; break; case "Line2": dataValue = Line2; break; case "City": dataValue = City; break; case "State": dataValue = State; break; case "ZipCode": dataValue = ZipCode; break; case "ZipPlus4": dataValue = ZipPlus4; break; case "PostalCode": dataValue = PostalCode; break; case "CityStateZipCode": dataValue = CityStateZipCode; break; default: dataValue = "!Error"; break; } return(dataValue); }