Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                return;
            }
            Tool.Admin.admin();
            Hq         = BLL.Product.GetHp()[0];
            Name.Text  = Hq.hq_name;
            emlia.Text = Hq.hq_emil;
            Fox.Text   = Hq.hq_fax;
            Phone.Text = Hq.hq_phone;
            Dizhi      = Hq.hq_site.Split('/');
            try
            {
                TextBox1.Text = Dizhi[3];
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
                throw;
            }

            Image1.ImageUrl = "../img/" + Hq.Img_url;
        }
Ejemplo n.º 2
0
        public static int UptHp(Model.hp hp)
        {
            string sql = $"update hq set hq_phone='{hp.hq_phone}',hq_fax='{hp.hq_fax}',hq_emil='{hp.hq_emil}',hq_name='{hp.hq_name}',hq_site='{hp.hq_site}',Img_url='{hp.Img_url}'";

            DAL.SqlHelper <hp> .ExceuteNonQuery(sql);

            return(DAL.SqlHelper <hp> .ExceuteNonQuery(sql));;
        }