Example #1
0
        public ActionResult EditCompany(VM.Company company)
        {
            var dbCompany = new Company();

            dbCompany.CompanyName       = company.CompanyName;
            dbCompany.City              = company.City;
            dbCompany.Address           = company.Address;
            dbCompany.Email             = company.Email;
            dbCompany.Street            = company.Street;
            dbCompany.Phone             = company.Phone;
            dbCompany.ContactPerson     = company.ContactPerson;
            dbCompany.StreetNumber      = company.StreetNumber;
            dbCompany.Zip               = company.Zip;
            dbCompany.ContractStartDate = company.ContractStartDate;
            dbCompany.ContractEndDate   = company.ContractEndDate;
            dbCompany.ContractStatus    = company.ContractStatus;
            companyDAL.EditCompany(dbCompany);
            return(RedirectToAction("Index"));
        }
Example #2
0
        public ActionResult EditCompany(string id)
        {
            var dbCompany = new VM.Company();

            var company = companyDAL.GetCompanyByName(id);

            dbCompany.CompanyName       = company.CompanyName;
            dbCompany.Address           = company.Address;
            dbCompany.Street            = company.Street;
            dbCompany.StreetNumber      = company.StreetNumber;
            dbCompany.Zip               = company.Zip;
            dbCompany.Email             = company.Email;
            dbCompany.ContactPerson     = company.ContactPerson;
            dbCompany.Phone             = company.Phone;
            dbCompany.City              = company.City;
            dbCompany.ContractStartDate = company.ContractStartDate;
            dbCompany.ContractEndDate   = company.ContractEndDate;
            dbCompany.ContractStatus    = company.ContractStatus;

            return(View(dbCompany));
        }
Example #3
0
        public ActionResult AddNewCompany()
        {
            var company = new VM.Company();

            return(View(company));
        }