コード例 #1
0
        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));
        }
コード例 #2
0
 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)
         })); }
 }
コード例 #3
0
        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));
        }
コード例 #4
0
 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)
         })); }
 }
コード例 #5
0
 public response GetChildren(DosarStadiu item, string tableName, int childrenId)
 {
     return(item.GetChildren(tableName, childrenId));
 }
コード例 #6
0
 public response GetChildrens(DosarStadiu item, string tableName)
 {
     return(item.GetChildrens(tableName));
 }
コード例 #7
0
 public response Delete(DosarStadiu item)
 {
     return(item.Delete());
 }
コード例 #8
0
 public response Update(DosarStadiu item)
 {
     return(item.Update());
 }
コード例 #9
0
 public response Insert(DosarStadiu item)
 {
     return(item.Insert());
 }