Example #1
0
 protected void CompanyAdd_Click(object sender, EventArgs e)
 {
     AppData.Instance.company.CompanyName = CompanyUC.CompanyName.Text;
     AppData.Instance.company.CompanyContactNumber = CompanyUC.ContactNum.Text;
     CompanyRepository comRepos = new CompanyRepository();
     lbMessage.Text = comRepos.AddCompany(AppData.Instance.company);
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         CompanyRepository compRepos = new CompanyRepository();
         companyGrid.DataSource = compRepos.GetCompanies();
         companyGrid.DataBind();
     }
 }
Example #3
0
 protected void CompanyAdd_Click(object sender, EventArgs e)
 {
     AppData.Instance.company.CompanyName = CompanyUC.CompanyName.Text;
     AppData.Instance.company.CompanyContactNumber = CompanyUC.ContactNum.Text;
     CompanyRepository compRepos = new CompanyRepository();
     lbMessage.Text = compRepos.UpdateCompany(AppData.Instance.company);
     btReturn.Visible = true;
     CompanyAdd.Visible = false;
 }