Esempio n. 1
0
        protected void Lblogins_Click(object sender, EventArgs e)
        {
            string   name  = Txtname.Text;
            string   phone = Txtphone.Text;
            string   date  = txtdate.Value;
            DateTime dtnow = DateTime.Now;

            if (!String.IsNullOrEmpty(date))
            {
                string[] a       = date.Split('/');
                string   formatd = a[2] + "/" + a[1] + "/" + a[0];
                dtnow = Utils.CDateDef(formatd, DateTime.Now);
            }
            if (user.Updateuser(_iUserID, name, phone, Rdsex.SelectedValue, dtnow))
            {
                string strScript = "<script>";
                strScript += "alert(' Cập nhật thành công!');";
                strScript += "window.location='/thong-tin-ca-nhan.html';";
                strScript += "</script>";
                Page.RegisterClientScriptBlock("strScript", strScript);
            }
            else
            {
                string strScript = "<script>";
                strScript += "alert('Lỗi!');";
                strScript += "</script>";
                Page.RegisterClientScriptBlock("strScript", strScript);
            }
        }
Esempio n. 2
0
        protected void Lblogins_Click(object sender, EventArgs e)
        {
            string   name      = Txtname.Text;
            string   phone     = Txtphone.Text;
            string   _date     = Dryear.SelectedValue + "/" + Drmoth.SelectedValue + "/" + Drday.SelectedIndex;
            DateTime _birthday = Utils.CDateDef(_date, DateTime.Now);

            if (user.Updateuser(_iUserID, name, phone, Drsex.SelectedValue, _birthday))
            {
                string strScript = "<script>";
                strScript += "alert(' Cập nhật thành công!');";
                strScript += "window.location='/m-thong-tin-ca-nhan.html';";
                strScript += "</script>";
                Page.RegisterClientScriptBlock("strScript", strScript);
            }
            else
            {
                string strScript = "<script>";
                strScript += "alert('Lỗi!');";
                strScript += "</script>";
                Page.RegisterClientScriptBlock("strScript", strScript);
            }
        }