public async Task <ActionResult> AddPhoneNumber(string data, string fieldPrefix, string newPhoneNumber, bool sms) { List <ListOfPhoneNumbersEditComponent.Entry> list = Utility.JsonDeserialize <List <ListOfPhoneNumbersEditComponent.Entry> >(data); string phoneNumber = PhoneNumberNationalAttribute.GetE164(newPhoneNumber); if (string.IsNullOrWhiteSpace(phoneNumber)) { throw new Error(this.__ResStr("invPhone", "Phone number {0} is not a valid phone number", newPhoneNumber)); } if ((from l in list where l.PhoneNumber == phoneNumber select l).FirstOrDefault() != null) { throw new Error(this.__ResStr("dupPhone", "Phone number {0} has already been added", newPhoneNumber)); } ListOfPhoneNumbersEditComponent.Entry entry = new ListOfPhoneNumbersEditComponent.Entry(phoneNumber, sms); return(await GridRecordViewAsync(await ListOfPhoneNumbersEditComponent.GridRecordAsync(fieldPrefix, entry))); }
public async Task <ActionResult> ListOfPhoneNumbersEdit_SortFilter(GridPartialViewData gridPVData) { return(await GridPartialViewAsync <ListOfPhoneNumbersEditComponent.Entry>(ListOfPhoneNumbersEditComponent.GetGridModel(false), gridPVData)); }