private void btnSave_Click(object sender, EventArgs e) { try { Company company = new Company(); company.CompanyName = txtCompanyName.Text.Trim(); company.Country = txtCountry.Text.Trim(); company.Address = txtAddress.Text.Trim(); company.City = txtCity.Text.Trim(); company.State = cmbState.SelectedValue.ToString(); company.CompanyPhone = txtCompanyPhone.Text.Trim(); company.Email = txtEmail.Text.Trim(); company.Website = txtWebsite.Text.Trim(); company.TIN = txtTIN.Text.Trim(); company.ServiceTaxNo = txtServiceTaxNo.Text.Trim(); company.AdditionalDetails = txtAdditionalDetails.Text.Trim(); company.PAN = txtPAN.Text.Trim(); company.Currency = String.Empty; company.Logo = ImagePath; company.Status = true; int companyId = companyService.AddCompany(company); CustomMessageBox.Show(string.Format(Constants.SUCCESSFULL_ADD_MESSAGE, Constants.CONSTANT_COMPANY, txtCompanyName.Text), Constants.CONSTANT_INFORMATION, CustomMessageBox.eDialogButtons.OK, CustomImages.GetDialogImage(Sleek_Bill.Controls.CustomImages.eCustomDialogImages.Success)); } catch (Exception ex) { MessageBox.Show("Error : " + ex.Message); } }
public IActionResult Create(Company company) { if (ModelState.IsValid) { _company.AddCompany(company); return(RedirectToAction("Index")); } return(View(company)); }
public IActionResult addCompany(employmentViewModel employmentViewModel) { Company company = new Company() { CompName = employmentViewModel.compy_name, Address = employmentViewModel.Address, ContactPerson = employmentViewModel.contactPerson }; _employRepo.AddCompany(company); return(RedirectToAction("Index")); }
public static int AddCompany(CompanyInfo Model) { companyDic[Model.CompanyId] = Model; return(dal.AddCompany(Model)); }