private void LoadCuaHang() { CuaHang ch = new CuaHang(); DataSet ds = ch.SelectByCuaHangID(CuaHangID); if (ds.Tables[0].Rows.Count != 1) { Response.Redirect("./message.aspx?msg=Failed in loading store"); } else { DataRow dr = ds.Tables[0].Rows[0]; lblTenCuaHang.Text = dr["TenCuaHang"].ToString(); lblDiaChi.Text = dr["DiaChi"].ToString(); lblDTCD.Text = dr["DienThoaiCoDinh"].ToString(); lblDTDD.Text = dr["DienThoaiDiDong"].ToString(); ChuCuaHangID = int.Parse(dr["NguoiDungID"].ToString()); ViewState["chucuahangid"] = ChuCuaHangID; switch (dr["LoaiCuaHangID"].ToString()) { //case "1": // stsGianHang.Href = "GianHang/VIP/css/style.css"; // //LoadTinTuc(); // break; case "2": stsGianHang.Href = "GianHang/CN/css/style.css"; //LoadTinTuc(); break; case "3": stsGianHang.Href = "GianHang/TT/css/style.css"; break; default: stsGianHang.Href = "GianHang/" + dr["TenLoaiCuaHang"].ToString() + "/css/style.css"; break; } //if ((dr["LoaiCuaHang"].ToString() == "1") || // (dr["LoaiCuaHang"].ToString() == "2")) //{ // //LoadTinTuc(); //} } }
void Page_PreInit(Object sender, EventArgs e) { CuaHang ch = new CuaHang(); DataSet ds = ch.SelectByCuaHangID(int.Parse(Request["sid"])); if ((ds.Tables[0].Rows.Count > 0) && (ds.Tables[0].Rows[0]["LoaiCuaHangID"].ToString() == "26")) { //ContentPlaceHolderID = "contentEstore"; this.MasterPageFile = "NewEstoreMaster.master"; } if (Session["masterpage"] != null) { this.MasterPageFile = (String)Session["masterpage"]; } }
private void LoadCuaHang() { if (Session["UserFullName"] != null) { tblchaomung.Visible = true; divDangNhap.Visible = false; } CuaHang ch = new CuaHang(); DataSet ds = ch.SelectByCuaHangID(CuaHangID); if (ds.Tables[0].Rows.Count != 1) { Response.Redirect("./message.aspx?msg=Failed in loading store"); } else { DataRow dr = ds.Tables[0].Rows[0]; lblLienHe.Text = dr["TenCuaHang"].ToString() + " " + dr["DiaChi"].ToString() + " - " + dr["DienThoaiCoDinh"].ToString() + " - " + dr["DienThoaiDiDong"].ToString(); ChuCuaHangID = int.Parse(dr["NguoiDungID"].ToString()); ViewState["chucuahangid"] = ChuCuaHangID; LoaiGianHangID = dr["LoaiCuaHangID"].ToString(); //switch (dr["LoaiCuaHangID"].ToString()) //{ // //case "1": // // stsGianHang.Href = "GianHang/VIP/css/style.css"; // // //LoadTinTuc(); // // break; // case "2": // stsGianHang.Href = "GianHang/CN/css/style.css"; // //LoadTinTuc(); // break; // case "3": // stsGianHang.Href = "GianHang/TT/css/style.css"; // break; // default: // stsGianHang.Href = "GianHang/" + dr["TenLoaiCuaHang"].ToString() + "/css/style.css"; // break; //} //if ((dr["LoaiCuaHang"].ToString() == "1") || // (dr["LoaiCuaHang"].ToString() == "2")) //{ // //LoadTinTuc(); //} } }