public string LoadLocationbyID(int id, ref Location location) { string answer = KEY_VALUES.OK; string url = string.Format("{0}location/readonce.php?id={1}", MyGlobalClass.Host, id); string jsonString = MyGlobalClass.GetResponsible(url); Location loc = new Location(); if (MyGlobalClass.TryConvert(jsonString, ref loc)) { location = loc; } else { if (string.IsNullOrEmpty(jsonString)) { answer = "You is offline"; } else { answer = "Location is not loaded, please try again"; } } return(answer); }
public string LoadContractByMaxid(ref Contract contract) { string answer = KEY_VALUES.OK; string url = MyGlobalClass.Host + "contract/readmaxid.php"; string jsonString = MyGlobalClass.GetResponsible(url); Contract c = new Contract(); if (MyGlobalClass.TryConvert(jsonString, ref c)) { contract = c; } else { if (string.IsNullOrEmpty(jsonString)) { answer = "You is offline"; } else { answer = "Contract is not loaded, please try again"; } } return(answer); }
public string LoadContracts(ref List <Contract> contractList) { string answer = KEY_VALUES.OK; string url = MyGlobalClass.Host + "contract/read.php"; string jsonString = MyGlobalClass.GetResponsible(url); List <Contract> list = new List <Contract>(); if (MyGlobalClass.TryConvert(jsonString, ref list)) { contractList = list; } else { if (string.IsNullOrEmpty(jsonString)) { answer = "You is offline"; } else { answer = "Contracts is not loaded, please try again"; } } return(answer); }
public string LoadFEACNbyID(int id, ref FEACN feacn) { string answer = KEY_VALUES.OK; string url = string.Format("{0}feacn/readbyid.php?id={1}", MyGlobalClass.Host, id); string jsonString = MyGlobalClass.GetResponsible(url); FEACN f = new FEACN(); if (MyGlobalClass.TryConvert(jsonString, ref f)) { feacn = f; } else { if (string.IsNullOrEmpty(jsonString)) { answer = "You is offline"; } else { answer = "FEACN is not loaded, please try again"; } } return(answer); }
public void CallingMethod() { MyGlobalClass.MyMethod(); }