public void DeleteCompany()
        {
            CompanyDAL companyDAL = new CompanyDAL();
            int        companyId  = companyDAL.GetCompanies().Max(x => x.Id);

            companyDAL.DeleteCompany(companyId);
            Assert.True(companyDAL.GetCompanyById(companyId) == null);
        }
Example #2
0
 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();
     }
 }
Example #3
0
        public bool DeleteCompany(CompanyBE company)
        {
            CompanyDAL companyDAL = new CompanyDAL();

            if (companyDAL.DeleteCompany(company))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #4
0
        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();
        }
Example #5
0
 public static void DeleteCompany(string IDs)
 {
     CompanyDAL.DeleteCompany(IDs);
 }
Example #6
0
        public void DeleteSelectedCompany(int CompanyId)
        {
            CompanyDAL companyDAL = new CompanyDAL();

            companyDAL.DeleteCompany(CompanyId);
        }
Example #7
0
 /// <summary>
 /// delete
 /// </summary>
 /// <param name="id"></param>
 public void DeleteCompany(int id)
 {
     CompDAL.DeleteCompany(id);
 }
Example #8
0
        public ReturnResult DeleteCompany(int companyID)
        {
            CompanyDAL CompanyDAL = new CompanyDAL();

            return(CompanyDAL.DeleteCompany(companyID));
        }