/// <summary> /// Metoda pentru stergerea relatiei Dosare-stadii curente /// </summary> /// <returns>SOCISA.response = new object(bool = status, string = error message, int = id-ul cheie returnat)</returns> public response Delete() { response toReturn = new response(false, "", null, null, new List <Error>());; Sentinta[] sentinte = (Sentinta[])this.GetSentinte().Result; try { foreach (Sentinta sj in sentinte) { DosarStadiuSentinta dssj = new DosarStadiuSentinta(); dssj.ID_DOSAR_STADIU = Convert.ToInt32(this.ID); dssj.ID_SENTINTA = Convert.ToInt32(sj.ID); dssj.Delete(); sj.Delete(); } } catch { } ArrayList _parameters = new ArrayList(); _parameters.Add(new MySqlParameter("_ID", this.ID)); DataAccess da = new DataAccess(authenticatedUserId, connectionString, CommandType.StoredProcedure, "DOSARE_STADIIsp_soft_delete", _parameters.ToArray()); toReturn = da.ExecuteDeleteQuery(); return(toReturn); }
public response Delete(int _ID_DOSAR_STADIU) { response toReturn = new response(true, "", null, null, new List <Error>());; DosarStadiuSentinta dssj = new DosarStadiuSentinta(); dssj.ID_DOSAR_STADIU = _ID_DOSAR_STADIU; dssj.ID_SENTINTA = Convert.ToInt32(this.ID); toReturn = dssj.Delete(); if (toReturn.Status) { toReturn = Delete(); /* this.Solutie.Delete(); */ } return(toReturn); }
public response Delete(DosarStadiuSentinta item) { return(item.Delete()); }