-
Notifications
You must be signed in to change notification settings - Fork 0
/
companyIntroduction.aspx.cs
263 lines (226 loc) · 10 KB
/
companyIntroduction.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class companyIntroduction : System.Web.UI.Page
{
dsCompanyTableAdapters.CompanyTableAdapter taCompany = new dsCompanyTableAdapters.CompanyTableAdapter();
dsCompany.CompanyDataTable dtCompany;
dsFeedBackTableAdapters.FeedbackTableAdapter taFeedBack = new dsFeedBackTableAdapters.FeedbackTableAdapter();
dsFeedBack.FeedbackDataTable dtFeedBack;
protected void Page_Load(object sender, EventArgs e)
{
SelectLogo();
SetHotSaleItems();
SetFeaturedItems();
SetHeaderLabels();
SetProfileDetail();
}
private void SetProfileDetail()
{
if (Request.QueryString["companyid"] != null)
{
int companyid = Convert.ToInt32(Request.QueryString["companyid"]);
dtCompany = taCompany.SelectAllCompanyByCompanyId(companyid);
if (dtCompany.Rows.Count > 0)
{
DataRow row = dtCompany.Rows[0];
lblAboutCompany.Text = row["AboutCompany"].ToString();
lblBrand.Text = row["Brand"].ToString();
lblOwner.Text = row["Owner"].ToString();
lblYearEstablished.Text = row["YearEstablished"].ToString();
lblContact.Text = row["Contact"].ToString();
lblEmail.Text = row["Email"].ToString();
lblTel1.Text = row["Tel1"].ToString();
lblFax1.Text = row["Fax1"].ToString();
lblURL.Text = row["URL"].ToString();
lblZipCode.Text = row["ZipCode"].ToString();
lblAddress.Text = row["Address"].ToString();
lblBusinessType.Text = row["BusinessType"].ToString();
lblMainProduct.Text = row["MainProduct"].ToString();
lblMainMarket.Text = row["MainMarket"].ToString();
lblApprovalCertificate.Text = row["ApprovalCertificate"].ToString();
lblMembership.Text = row["Membership"].ToString();
}
}
}
private void SetHotSaleItems()
{
dsProductTableAdapters.ProductTableAdapter taProduct = new dsProductTableAdapters.ProductTableAdapter();
DataList1.DataSource = taProduct.GetHotSale(Convert.ToInt16(Request.QueryString["CompanyId"]), true, false);
DataList1.DataBind();
}
private void SetFeaturedItems()
{
dsProductTableAdapters.ProductTableAdapter taProduct = new dsProductTableAdapters.ProductTableAdapter();
DataList2.DataSource = taProduct.GetFeaturedProducts(Convert.ToInt16(Request.QueryString["CompanyId"]), false, true);
DataList2.DataBind();
}
private void SelectLogo()
{
switch (Request.QueryString["qv"].ToString())
{
case "mb":
Image3.ImageUrl = "~/frontimages/SmallPics/MBCom_Logo.gif";
//lblcompname.Text = "MB COMMUNICATIONS";
//lblBrand.Text = "Black Copper";
//lblEmail.Text="najeeb@mbcommunication.com.pk";
//lnkUrl.Text = "http://mbcommunication.com.pk/";
//lblBusinessType.Text = "Networking Products";
//lblMainProducts.Text = "Switches and Routers";
//lblCertificate.Text = "Black Copper";
//lblMembership.Text="Taiwan Association of Networking Products ";
break;
case "bc":
Image3.ImageUrl = "~/frontimages/SmallPics/BlackCopper_Logo.gif";
//lblcompname.Text = "BLACK COPPERS";
//lblBrand.Text = "Black Copper";
//lblEmail.Text="najeeb@blackcopper.com.pk";
//lnkUrl.Text = "http://blackcopper.net/";
//lblBusinessType.Text = "Networking Accessories";
//lblMainProducts.Text = "Labtops";
//lblCertificate.Text = "Black Copper";
//lblMembership.Text="Taiwan Association of Networking Products ";
break;
case "bs":
Image3.ImageUrl = "~/frontimages/SmallPics/BadiShop_Logo.gif";
//lblcompname.Text = "BADI SHOPS";
//lblBrand.Text = "Export Quality";
//lblEmail.Text="najeeb@badishops.com.pk";
//lnkUrl.Text = "http://badishops.com.pk/";
//lblBusinessType.Text = "General Accessories";
//lblMainProducts.Text = "Agricutlures and Food Items";
//lblCertificate.Text = "Fresh Food Association of Pakistan";
//lblMembership.Text="Pakistan Association of Fresh Foods and Agriculures";
break;
case "bb":
Image3.ImageUrl = "~/frontimages/SmallPics/BikenBike_Logo.gif";
//lblcompname.Text = "BIKE AND BIKE";
//lblBrand.Text = "DYL (Yamaha) , Honda";
//lblEmail.Text="najeeb@bikenbike.com.pk";
//lnkUrl.Text = "http://bikenbike.com.pk/";
//lblBusinessType.Text = "Motorcycles and Spare Parts";
//lblMainProducts.Text = "DYL Motorcycles , Honda , Suzuky and Chineese bikes";
//lblCertificate.Text = "DYL Motorcycles Pvt Ltd";
//lblMembership.Text = "Pakistan Automotive Manufacturers Association";
break;
case "wa":
Image3.ImageUrl = "~/frontimages/SmallPics/WebArt_Logo.gif";
//lblcompname.Text = "WEB ART";
//lblBrand.Text = "Microsoft";
//lblEmail.Text="najeeb@webart.com.pk";
//lnkUrl.Text = "http://webart.com.pk/";
//lblBusinessType.Text = "Logo and Website Designing";
//lblMainProducts.Text = ".Net Web Development using C# , Adobe Photoshop CS11 and .Net Desktop Application Development ";
//lblCertificate.Text = "Microsoft";
//lblMembership.Text = "Microsoft Certified Professional";
break;
}
}
private void SetHeaderLabels()
{
switch (Request.QueryString["qv"])
{
case "bs":
lblaboutthecompany.Text = "About Badi Shops";
lblCompanyProfile.Text = "Badi Shops profile detail";
lblHotSale.Text = "Hot Sale of Badi Shops";
lblFeaturedProducts.Text = "Featured Products of Badi shops";
lblInquiretocompany.Text = "Make Inquiry to Badi Shops";
lblMapLocation.Text = "Map Location of Badi Shops";
break;
case "bc":
lblaboutthecompany.Text = "About Black Copper";
lblCompanyProfile.Text = "Black Copper profile detail";
lblHotSale.Text = "Hot Sale of Black Copper";
lblFeaturedProducts.Text = "Featured Products of Black Copper";
lblInquiretocompany.Text = "Make Inquiry to Black Copper";
lblMapLocation.Text = "Map Location of Black Copper";
break;
case "wa":
lblaboutthecompany.Text = "About Web Art";
lblCompanyProfile.Text = "Web Art profile detail";
lblHotSale.Text = "Hot Sale of Web Art";
lblFeaturedProducts.Text = "Featured Products of Web Art";
lblInquiretocompany.Text = "Make Inquiry to Web Art";
lblMapLocation.Text = "Map Location of Web Art";
break;
case "mb":
lblaboutthecompany.Text = "About MB Communication";
lblCompanyProfile.Text = "MB profile detail";
lblHotSale.Text = "Hot Sale of MB";
lblFeaturedProducts.Text = "Featured Products of MB";
lblInquiretocompany.Text = "Make Inquiry to MB";
lblMapLocation.Text = "Map Location of MB";
break;
case "bb":
lblaboutthecompany.Text = "About BikenBike";
lblCompanyProfile.Text = "BikenBike profile detail";
lblHotSale.Text = "Hot Sale of BikenBike";
lblFeaturedProducts.Text = "Featured Products of BikenBike";
lblInquiretocompany.Text = "Make Inquiry to BikenBike";
lblMapLocation.Text = "Map Location of BikenBike";
break;
}
}
protected void btnAdd_Click(object sender, EventArgs e)
{
int companyid = Convert.ToInt32(Request.QueryString["companyid"]);
taFeedBack.AddFeedBack(txtName.Text.Trim(),
txtEmail1.Text.Trim(),
txtPhone.Text.Trim(),
txtCity.Text.Trim(),
txtOccupation.Text.Trim(),
txtCompany.Text.Trim(),
ddlAge.SelectedItem.Value,
txtComments1.Text.Trim(),
DateTime.Now);
Server.Transfer("EmailTemplates/FeedbackEmailConfirmation.aspx?companyid=" + companyid);
}
#region Properties Section
public string Name
{
get { return txtName.Text.Trim(); }
}
public string Email
{
get { return txtEmail1.Text.Trim(); }
}
public string Phone
{
get { return txtPhone.Text.Trim(); }
}
public string City
{
get { return txtCity.Text.Trim(); }
}
public string Occupation
{
get { return txtOccupation.Text.Trim(); }
}
public string Company
{
get { return txtCompany.Text.Trim(); }
}
public string Age
{
get { return ddlAge.SelectedItem.Text; }
}
public string Comments
{
get { return txtComments1.Text.Trim(); }
}
#endregion
protected void DataList1_SelectedIndexChanged(object sender, EventArgs e)
{
}
protected void DataList2_SelectedIndexChanged(object sender, EventArgs e)
{
}
}