public void DeleteCompany() { CompanyDAL companyDAL = new CompanyDAL(); int companyId = companyDAL.GetCompanies().Max(x => x.Id); companyDAL.DeleteCompany(companyId); Assert.True(companyDAL.GetCompanyById(companyId) == null); }
protected void gvCompany_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "DeleteCompany") { CompanyDAL compdal = new CompanyDAL(); compdal.ConnectionString = ConfigurationManager.ConnectionStrings["MySQLConn"].ToString(); compdal.DeleteCompany(e.CommandArgument.ToString()); FillCompany(); } }
public bool DeleteCompany(CompanyBE company) { CompanyDAL companyDAL = new CompanyDAL(); if (companyDAL.DeleteCompany(company)) { return(true); } else { return(false); } }
protected void GVCompany_RowDeleting(object sender, GridViewDeleteEventArgs e) { CompanyDAL CompDAL = new CompanyDAL { ConnectionString = ConfigurationManager.ConnectionStrings["MySQLTest"].ToString() }; Company command = new Company { Name = (GVCompany.Rows[e.RowIndex].FindControl("LblNameEng") as Label).Text }; CompDAL.DeleteCompany(command.Name); GVCompany.EditIndex = -1; FetchCompany(); }
public static void DeleteCompany(string IDs) { CompanyDAL.DeleteCompany(IDs); }
public void DeleteSelectedCompany(int CompanyId) { CompanyDAL companyDAL = new CompanyDAL(); companyDAL.DeleteCompany(CompanyId); }
/// <summary> /// delete /// </summary> /// <param name="id"></param> public void DeleteCompany(int id) { CompDAL.DeleteCompany(id); }
public ReturnResult DeleteCompany(int companyID) { CompanyDAL CompanyDAL = new CompanyDAL(); return(CompanyDAL.DeleteCompany(companyID)); }