예제 #1
0
 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);
     }
 }
예제 #2
0
 public IActionResult Create(Company company)
 {
     if (ModelState.IsValid)
     {
         _company.AddCompany(company);
         return(RedirectToAction("Index"));
     }
     return(View(company));
 }
예제 #3
0
        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"));
        }
예제 #4
0
 public static int AddCompany(CompanyInfo Model)
 {
     companyDic[Model.CompanyId] = Model;
     return(dal.AddCompany(Model));
 }