Example #1
0
 protected void btnLuu_Click(object sender, EventArgs e)
 {
     try
     {
         HoTroTrucTuyen ht = new HoTroTrucTuyen();
         if (Request.QueryString["hid"] == null)
         {
             ht.InsertFields(int.Parse(Request.QueryString["sid"]), txtHoTro.Text, txtYM.Text, txtHoVaTen.Text,
                             txtDienThoai.Text, txtEmail.Text);
         }
         else
         {
             ht.UpdateFields(Convert.ToInt32(Request.QueryString["hid"]), int.Parse(Request.QueryString["sid"]),
                             txtHoTro.Text, txtYM.Text, txtHoVaTen.Text,
                             txtDienThoai.Text, txtEmail.Text);
         }
         string strScript = "<script language='JavaScript'>" + "window.parent.RefreshStoreInfo();</script>";
         ClientScript.RegisterStartupScript(GetType(), "Refresh", strScript);
     }
     catch (Exception ex)
     {
         Response.Write(ex.ToString());
     }
 }