public response Update(string fieldValueCollection) { DosarProces tmpItem = JsonConvert.DeserializeObject <DosarProces>(fieldValueCollection); // sa vedem daca merge asa sau trebuie cu JObject //return JsonConvert.DeserializeObject<DosarProces>(Find(Convert.ToInt32(tmpItem.ID)).Message).Update(fieldValueCollection); return(((DosarProces)(Find(Convert.ToInt32(tmpItem.ID)).Result)).Update(fieldValueCollection)); }
public response GetAll() { try { DataAccess da = new DataAccess(authenticatedUserId, connectionString, CommandType.StoredProcedure, "DOSARE_PROCESEsp_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()) { DosarProces a = new DosarProces(authenticatedUserId, connectionString, (IDataRecord)r); aList.Add(a); } r.Close(); r.Dispose(); DosarProces[] toReturn = new DosarProces[aList.Count]; for (int i = 0; i < aList.Count; i++) { toReturn[i] = (DosarProces)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) { //DosarProces item = JsonConvert.DeserializeObject<DosarProces>(Find(id).Message); DosarProces item = (DosarProces)(Find(id).Result); return(item.Update(fieldValueCollection)); }
public response Find(int _id) { try { DosarProces item = new DosarProces(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 Delete(int _ID_DOSAR) { response toReturn = new response(false, "", null, null, new List <Error>()); DosarProces dp = new DosarProces(authenticatedUserId, connectionString); dp.ID_DOSAR = _ID_DOSAR; dp.ID_PROCES = Convert.ToInt32(this.ID); toReturn = dp.Delete(); if (toReturn.Status) { toReturn = Delete(); } return(toReturn); }
public response Update(int _ID_DOSAR) { response toReturn = Update(); if (toReturn.Status) { try { DosarProces dpj = new DosarProces() { ID = null, ID_DOSAR = _ID_DOSAR, ID_PROCES = Convert.ToInt32(this.ID) }; response r = dpj.Insert(); } catch { } } return(toReturn); }
public response GetChildren(DosarProces item, string tableName, int childrenId) { return(item.GetChildren(tableName, childrenId)); }
public response GetChildrens(DosarProces item, string tableName) { return(item.GetChildrens(tableName)); }
public response Delete(DosarProces item) { return(item.Delete()); }
public response Update(DosarProces item) { return(item.Update()); }
public response Insert(DosarProces item) { return(item.Insert()); }