public void Delete(Int32 id) { this.ID = id; //удаление прив¤занных за¤вок var profileForDelete = new UsersProfiles() { ID = id }; profileForDelete.GetById(); var userTickets = new Tickets() { UserProfileID = profileForDelete.ID }; var userTicketsList = userTickets.GetAllItemsByUserProfileID(); foreach (DataRow row in userTicketsList.Tables[0].Rows) { var userTicketsToDelete = new Tickets(); userTicketsToDelete.Delete(Convert.ToInt32(row["ID"])); } DM.DeleteData(this); }
public void Delete(Int32 id, int curentUserId, string curentUserIp, string curentPageName) { this.ID = id; //удаление привязанных за¤вок var profileForDelete = new UsersProfiles() { ID = id }; profileForDelete.GetById(); var userTickets = new Tickets() { UserProfileID = profileForDelete.ID }; var userTicketsList = userTickets.GetAllItemsByUserProfileID(); foreach (DataRow row in userTicketsList.Tables[0].Rows) { var userTicketsToDelete = new Tickets(); userTicketsToDelete.Delete(Convert.ToInt32(row["ID"]), curentUserId, curentUserIp, curentPageName, row["FullSecureID"].ToString()); } DM.DeleteData(this, curentUserId, curentUserIp, curentPageName); }
public void Delete(Int32 id, int curentUserId, string curentUserIp, string curentPageName) { this.ID = id; //удаление привязанных профилей var userprofile = new UsersProfiles { UserID = id }; var userprofilelist = userprofile.GetAllItemsByUserID(); foreach (DataRow row in userprofilelist.Tables[0].Rows) { var userprofileToDelete = new UsersProfiles(); userprofileToDelete.Delete(Convert.ToInt32(row["ID"]), curentUserId, curentUserIp, curentPageName); } DM.DeleteData(this, curentUserId, curentUserIp, curentPageName); }