-
Notifications
You must be signed in to change notification settings - Fork 0
/
Acc_MyCompanies.aspx.cs
81 lines (58 loc) · 2.58 KB
/
Acc_MyCompanies.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WCF_SERVICE_CLIENT_HOST;
using WCF_SERVICE_CLIENT_HOST.Models;
namespace AAFS
{
public partial class AccMyCompanies : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string OwnrID = Session["ID"].ToString();
OwnerServicesClient ownrServClnt = new OwnerServicesClient();
List<OwnersCompany> ownrCompList = new List<OwnersCompany>();
ownrCompList = ownrServClnt.getCompByOwnerId(OwnrID);
string CompanyList = "";
CompanyList += "<table class='table table-striped'>";
//CompanyList += "<caption>Accommodations</caption>";
CompanyList += "<tr>";
CompanyList += "<th>" + "Company Name";
CompanyList += "</th>";
CompanyList += "<th >" + "Company Registration Number ";
CompanyList += "</th>";
CompanyList += "<th >" + "Telephone number";
CompanyList += "</th>";
CompanyList += "<th >" + "Email";
CompanyList += "</th>";
CompanyList += "<th >" + " Edit Company Details";
CompanyList += "</th>";
CompanyList += "</tr>";
foreach (OwnersCompany myCompany in ownrCompList)
{
CompanyList += "<tr>";
CompanyList += "<th>" + myCompany.CompanyName;
CompanyList += "</th>";
CompanyList += "<td>" + myCompany.RegNum;
CompanyList += "</td>";
CompanyList += "<td>" + myCompany.ContactNum;
CompanyList += "</td>";
CompanyList += "<td>" + myCompany.Email;
CompanyList += "</td>";
CompanyList += "<td>";
CompanyList += "<a class='btn btn-info' style='color: #000;width:80%;' href='Acc_EditCompanyDet.aspx?CompID=" + myCompany.CompId + "'>Update</a>";
CompanyList += "</td>";
CompanyList += "</tr>";
}
CompanyList += "</Table>";
MyCompListDiv.InnerHtml = CompanyList;
}
protected void btnAddNewCompany_Click(object sender, EventArgs e)
{
Response.Redirect("Acc_AddCompany.aspx");
}
}
}