public response Update(string fieldValueCollection) { DosarStadiu tmpItem = JsonConvert.DeserializeObject <DosarStadiu>(fieldValueCollection); // sa vedem daca merge asa sau trebuie cu JObject //return JsonConvert.DeserializeObject<DosarStadiu>(Find(Convert.ToInt32(tmpItem.ID)).Message).Update(fieldValueCollection); return(((DosarStadiu)(Find(Convert.ToInt32(tmpItem.ID)).Result)).Update(fieldValueCollection)); }
public response GetAll() { try { DataAccess da = new DataAccess(authenticatedUserId, connectionString, CommandType.StoredProcedure, "DOSARE_STADIIsp_select", new object[] { new MySqlParameter("_SORT", null), new MySqlParameter("_ORDER", null), new MySqlParameter("_FILTER", null), new MySqlParameter("_LIMIT", null) }); ArrayList aList = new ArrayList(); MySqlDataReader r = da.ExecuteSelectQuery(); while (r.Read()) { DosarStadiu a = new DosarStadiu(authenticatedUserId, connectionString, (IDataRecord)r); aList.Add(a); } r.Close(); r.Dispose(); DosarStadiu[] toReturn = new DosarStadiu[aList.Count]; for (int i = 0; i < aList.Count; i++) { toReturn[i] = (DosarStadiu)aList[i]; } return(new response(true, JsonConvert.SerializeObject(toReturn, CommonFunctions.JsonSerializerSettings), toReturn, null, null)); } catch (Exception exp) { LogWriter.Log(exp); return(new response(false, exp.ToString(), null, null, new System.Collections.Generic.List <Error>() { new Error(exp) })); } }
public response Update(int id, string fieldValueCollection) { //DosarStadiu item = JsonConvert.DeserializeObject<DosarStadiu>(Find(id).Message); DosarStadiu item = (DosarStadiu)(Find(id).Result); return(item.Update(fieldValueCollection)); }
public response Find(int _id) { try { DosarStadiu item = new DosarStadiu(authenticatedUserId, connectionString, _id); return(new response(true, JsonConvert.SerializeObject(item, CommonFunctions.JsonSerializerSettings), item, null, null));; } catch (Exception exp) { LogWriter.Log(exp); return(new response(false, exp.ToString(), null, null, new System.Collections.Generic.List <Error>() { new Error(exp) })); } }
public response GetChildren(DosarStadiu item, string tableName, int childrenId) { return(item.GetChildren(tableName, childrenId)); }
public response GetChildrens(DosarStadiu item, string tableName) { return(item.GetChildrens(tableName)); }
public response Delete(DosarStadiu item) { return(item.Delete()); }
public response Update(DosarStadiu item) { return(item.Update()); }
public response Insert(DosarStadiu item) { return(item.Insert()); }