private void LoadData(string Id) { try { CuaHang ch = new CuaHang(); DataSet ds = ch.SelectByID(Convert.ToInt32(Id)); if (ds.Tables[0].Rows.Count > 0) { txtTenCuaHang.Text = ds.Tables[0].Rows[0]["TenCuaHang"].ToString(); if (ds.Tables[0].Rows[0]["LoaiCuaHang"].ToString() != "") { ddlLoaiGianHang.SelectedValue = ds.Tables[0].Rows[0]["LoaiCuaHangID"].ToString(); } else { ddlLoaiGianHang.SelectedIndex = 0; } } } catch (Exception ex) { Response.Write(ex.ToString()); } }
private void LoadCuaHang(int CuaHangID) { CuaHang ch = new CuaHang(); DataSet ds = ch.SelectByID(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]; string content = ""; content += "Gian Hàng: " + dr["TenCuaHang"] + "<br/>"; content += "Địa chỉ liên hệ: " + dr["DiaChi"] + "<br/>"; content += "Điện thoại: " + dr["DienThoaiCoDinh"] + " - " + dr["DienThoaiDiDong"]; content += "Email: " + dr["Email"]; ViewState["email"] = dr["Email"].ToString(); divGianHang.InnerHtml = content; //content += int.Parse(dr["NguoiDungID"].ToString()); //switch (dr["LoaiCuaHang"].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; //} //if ((dr["LoaiCuaHang"].ToString() == "1") || // (dr["LoaiCuaHang"].ToString() == "2")) //{ // LoadTinTuc(); //} } }
private void LoadCuaHang() { CuaHang ch = new CuaHang(); DataSet ds = ch.SelectByID(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 = "<a href=\"estore.aspx?sid=" + dr["CuaHangID"] + "\">" + dr["TenCuaHang"] + "</a>"; lblGioiThieu.Text = dr["GioiThieu"].ToString(); lblDiaChi.Text = dr["DiaChi"].ToString(); lblEmail.Text = dr["Email"].ToString(); lblCoDinh.Text = dr["DienThoaiCoDinh"].ToString(); lblDiDong.Text = dr["DienThoaiDiDong"].ToString(); lblFax.Text = dr["Fax"].ToString(); lblBack.Text = "<a href=\"estore.aspx?sid=" + dr["CuaHangID"] + "\"><span style=\"color:blue;text-decoration:underline;\">QUAY LẠI TRANG TRƯỚC</span></a>"; } }
private void LoadCuaHang() { CuaHang ch = new CuaHang(); DataSet ds = ch.SelectByID(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()); //imgLoGo.Src = dr["Anh"].ToString(); //switch (dr["LoaiCuaHang"].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/TT/css/style.css"; // break; //} //if ((dr["LoaiCuaHang"].ToString() == "1") || // (dr["LoaiCuaHang"].ToString() == "2")) //{ // LoadTinTuc(); //} } }
private void LoadCuaHang(int sid) { CuaHang ch = new CuaHang(); DataSet ds = ch.SelectByID(sid); if (ds.Tables[0].Rows.Count == 1) { DataRow dr = ds.Tables[0].Rows[0]; txtTen.Text = dr["TenCuaHang"].ToString(); txtDiaChi.Text = dr["DiaChi"].ToString(); txtCoDinh.Text = dr["DienThoaiCoDinh"].ToString(); txtDiDong.Text = dr["DienThoaiDiDong"].ToString(); txtFax.Text = dr["Fax"].ToString(); txtEmail.Text = dr["Email"].ToString(); ; txtWebSite.Text = dr["WebSite"].ToString(); txtYahoo.Text = dr["YM"].ToString(); txtLienHe.Text = dr["ThongTinLienHe"].ToString(); txtGioiThieu.Text = dr["GioiThieu"].ToString(); imgStore.ImageUrl = "." + dr["Anh"]; } else { Response.Redirect("../message.aspx?msg=Invalid parameter"); } }
private void LoadCuaHang() { CuaHang ch = new CuaHang(); DataSet ds = ch.SelectByID(sid); if (ds.Tables[0].Rows.Count == 1) { DataRow dr = ds.Tables[0].Rows[0]; imgStore.ImageUrl = "." + dr["Anh"]; } else { Response.Redirect("../message.aspx?msg=Invalid parameter"); } }
private void LoadCuaHang() { CuaHang ch = new CuaHang(); DataSet ds = ch.SelectByID(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]; ChuCuaHangID = int.Parse(dr["NguoiDungID"].ToString()); } }