public UserService_Client GetClient(string UserName, string Password, string CaseId) { if (!UserAuth(UserName, Password)) { return(null); } try { string query = "SELECT * FROM Client WHERE disabled = '0' AND Case_Id = " + ClsDB.sqlEncode(CaseId); DataTable dt = new ClsDB().ExecuteDataTable(query); if (dt.Rows.Count == 1) { DataRow r = dt.Rows[0]; UserService_Client c = new UserService_Client(); c.Case_Id = ClsUtil.getStrVal(r["Case_Id"]); c.Client_Type = ClsClient.getClientType(ClsUtil.getStrVal((r["Client_Type"]))); c.First_Name = ClsUtil.getStrVal(r["First_Name"]); c.Last_Name = ClsUtil.getStrVal(r["Last_Name"]); return(c); } } catch (Exception ex) { } return(null); }
public List <UserService_Client> GetClientList(string UserName, string Password) { if (!UserAuth(UserName, Password)) { return(null); } List <UserService_Client> list = new List <UserService_Client>(); try { string query = "SELECT * FROM Client WHERE disabled = '0'"; DataTable dt = new ClsDB().ExecuteDataTable(query); for (int i = 0; i < dt.Rows.Count; ++i) { UserService_Client c = new UserService_Client(); c.Case_Id = ClsUtil.getStrVal(dt.Rows[i]["Case_Id"]); c.Client_Type = ClsClient.getClientType(ClsUtil.getStrVal((dt.Rows[i]["Client_Type"]))); c.First_Name = ClsUtil.getStrVal(dt.Rows[i]["First_Name"]); c.Last_Name = ClsUtil.getStrVal(dt.Rows[i]["Last_Name"]); list.Add(c); } } catch (Exception ex) { list.Clear(); } return(list); }
async Task InsertClient(ClsClient client, ClsAccount account) { try { await apiCore.PostClient(client, account.IdCuenta, account.Balance, account.TipoCuenta); } catch (Exception ex) { await dialogService.DisplayAlertAsync("Error", $"{ex.Message}", "ok"); } }
string ShowViewForm() { string s = ""; string star = "<font color='red'>*</font>"; s += "<tr><td>Case Id:" + star + "</td><td width='150'>" + this.client.Case_Id + " </td></tr>"; if (this.client.Client_Type != "1") { s += "<tr><td>Attorney:</td><td>" + ClsUtil.getNameById("Attorney", this.client.Attorney) + " </td></tr>"; } s += "<tr><td>Paralegal:</td><td>" + ClsUtil.getNameById("Paralegal", this.client.Paralegal) + " </td></tr>"; s += "<tr><td>Date Of Injury:</td><td>" + this.client.Date_Of_Injury + " </td></tr>"; s += "<tr><td>Statute Of Limitation:</td><td>" + this.client.Statute_Of_Limitation + " </td></tr>"; if (this.client.Client_Type != "1") { s += "<tr><td>Phone Number:</td><td>" + this.client.Phone_Number + " </td></tr>"; s += "<tr><td>Address:</td><td>" + this.client.Address + " </td></tr>"; s += "<tr><td>Date Of Birth:</td><td>" + this.client.Date_Of_Birth + " </td></tr>"; s += "<tr><td>Social Security Number:</td><td>" + this.client.Social_Security_Number + " </td></tr>"; } s = "<table class='T1'>" + s + "</table>"; string t = ""; t += "<tr><td>Client Type:" + star + "</td><td width='250'>" + ClsClient.getClientType(this.client.Client_Type) + " </td></tr>"; t += "<tr><td>First Name:</td><td>" + this.client.First_Name + " </td></tr>"; t += "<tr><td>Last Name:</td><td>" + this.client.Last_Name + " </td></tr>"; t += "<tr><td>Case Type:</td><td>" + this.client.Case_Type + " </td></tr>"; if (this.client.Client_Type != "1") { t += "<tr><td>At Fault Party:</td><td>" + this.client.At_Fault_Party + " </td></tr>"; t += "<tr><td>Settlement Type:</td><td>" + this.client.Settlement_Type + " </td></tr>"; t += "<tr><td>Settlement Amount:</td><td>" + this.client.Settlement_Amount + " </td></tr>"; } t += "<tr><td>Disposition:</td><td>" + this.client.Disposition + " </td></tr>"; if (this.client.Client_Type != "2" && this.client.Client_Type != "3") { t += "<tr><td>Case Notes:</td><td><pre class='text_area'>" + this.client.Case_Notes + "</pre> </td></tr>"; t += "<tr><td>Date For Perspective Client:</td><td>" + this.client.Date_For_Perspective_Client + " </td></tr>"; } t = "<table class='T1'>" + t + "</table>"; return("<table><tr><td valign='top'>" + s + "</td><td width='50'><br></td><td valign='top'>" + t + "</td></tr></table>"); }
string ShowEditForm() { string s = ""; string star = "<font color='red'>*</font>"; s += "<tr><td>Case Id:" + star + "</td><td><input type='text' maxlength='10' id='txtCaseId' name='txtCaseId' value='" + this.client.Case_Id + "' onkeypress=\"javascript: return numberOnly(event);\"></td></tr>"; s += "<tr><td>Attorney:</td><td>" + ClsClient.writeAttorneyList("txtAttorney", "txtAttorney", this.client.Attorney) + "</td></tr>"; s += "<tr><td>Paralegal:</td><td>" + ClsClient.writeParalegalList("txtParalegal", "txtParalegal", this.client.Paralegal) + "</td></tr>"; s += "<tr><td>Date Of Injury:</td><td><input type='text' class='datetime' maxlength='10' id='txtDateOfInjury' name='txtDateOfInjury' value='" + ClsUtil.textboxEncode(this.client.Date_Of_Injury) + "'></td></tr>"; s += "<tr><td>Statute Of Limitation:</td><td><input type='text' maxlength='100' id='txtStatuteLimit' name='txtStatuteLimit' value='" + ClsUtil.textboxEncode(this.client.Statute_Of_Limitation) + "'></td></tr>"; s += "<tr><td>Phone Number:</td><td><input type='text' maxlength='100' id='txtPhone' name='txtPhone' value='" + ClsUtil.textboxEncode(this.client.Phone_Number) + "'></td></tr>"; s += "<tr><td>Address:</td><td><input type='text' maxlength='100' id='txtAddress' name='txtAddress' value='" + ClsUtil.textboxEncode(this.client.Address) + "'></td></tr>"; s += "<tr><td>Date Of Birth:</td><td><input type='text' class='datetime' maxlength='10' id='txtDOB' name='txtDOB' value='" + ClsUtil.textboxEncode(this.client.Date_Of_Birth) + "'></td></tr>"; s += "<tr><td>Social Security Number:</td><td><input type='text' maxlength='11' id='txtSSN' name='txtSSN' value='" + ClsUtil.textboxEncode(this.client.Social_Security_Number) + "'></td></tr>"; s = "<table class='T1'>" + s + "</table>"; string t = ""; t += "<tr><td>Client Type:" + star + "</td><td>" + ClsClient.writeClientTypeList("txtClientType", "txtClientType", this.client.Client_Type) + "</td></tr>"; t += "<tr><td>First Name:</td><td><input type='text' maxlength='100' id='txtFirstName' name='txtFirstName' value='" + ClsUtil.textboxEncode(this.client.First_Name) + "'></td></tr>"; t += "<tr><td>Last Name:</td><td><input type='text' maxlength='100' id='txtLastName' name='txtLastName' value='" + ClsUtil.textboxEncode(this.client.Last_Name) + "'></td></tr>"; t += "<tr><td>Case Type:</td><td><input type='text' maxlength='100' id='txtCaseType' name='txtCaseType' value='" + ClsUtil.textboxEncode(this.client.Case_Type) + "'></td></tr>"; t += "<tr><td>At Fault Party:</td><td><input type='text' maxlength='100' id='txtFaultParty' name='txtFaultParty' value='" + ClsUtil.textboxEncode(this.client.At_Fault_Party) + "'></td></tr>"; t += "<tr><td>Settlement Type:</td><td><input type='text' maxlength='100' id='txtSettleType' name='txtSettleType' value='" + ClsUtil.textboxEncode(this.client.Settlement_Type) + "'></td></tr>"; t += "<tr><td>Settlement Amount:</td><td><input type='text' maxlength='100' id='txtSettleAmount' name='txtSettleAmount' value='" + ClsUtil.textboxEncode(this.client.Settlement_Amount) + "'></td></tr>"; t += "<tr><td>Disposition:</td><td><input type='text' maxlength='100' id='txtDisposition' name='txtDisposition' value='" + ClsUtil.textboxEncode(this.client.Disposition) + "'></td></tr>"; t += "<tr><td>Case Notes:</td><td><textarea rows='10' cols='30' id='txtCaseNotes' name='txtCaseNotes'>" + this.client.Case_Notes + "</textarea></td></tr>"; t += "<tr><td>Date For Perspective Client:</td><td><input type='text' class='datetime' maxlength='10' id='txtDateForPersClient' name='txtDateForPersClient' value='" + ClsUtil.textboxEncode(this.client.Date_For_Perspective_Client) + "'></td></tr>"; t = "<table class='T1'>" + t + "</table>"; return("<table><tr><td valign='top'>" + s + "</td><td width='50'><br></td><td valign='top'>" + t + "</td></tr></table>" + "<br/><input value=\"Submit Change\" type=\"button\" onclick=\"javascript:update();\" />"); }
public async Task PutClient(ClsClient client) { var postRequest = RestService.For <IApiCore>(ConfigApi.ApiUrl); await postRequest.PutClient(client); }
public async Task PostClient([Body] ClsClient clsClient, int idAccount, double balance, string tipoCuenta) { var postRequest = RestService.For <IApiCore>(ConfigApi.ApiUrl); await postRequest.PostClient(clsClient, idAccount, balance, tipoCuenta); }