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