예제 #1
0
 private bool CheckValue()
 {
     /*if (string.IsNullOrEmpty(TxtID1.Text))
      * {
      *  ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('与会人员身份证不能为空!');", true);
      *  TxtID1.Focus();
      *  return false;
      * }
      * if (string.IsNullOrEmpty(TxtNumber.Text))
      * {
      *  ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('会议编号不能为空!');", true);
      *  TxtNumber.Focus();
      *  return false;
      * }
      * if (string.IsNullOrEmpty(TxtID2.Text))
      * {
      *  ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('陪同人员身份证不能为空!');", true);
      *  TxtID2.Focus();
      *  return false;
      * }*/
     if (string.IsNullOrEmpty(TxtHotelName.Text))
     {
         ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('宾馆名称不能为空!');", true);
         TxtHotelName.Focus();
         return(false);
     }
     if (string.IsNullOrEmpty(TxtRoomNumber.Text))
     {
         ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('房间号不能为空!');", true);
         TxtRoomNumber.Focus();
         return(false);
     }
     return(true);
 }
예제 #2
0
 private bool CheckValue()
 {
     /*if (string.IsNullOrEmpty(TxtID.Text))
      * {
      *  ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('身份证不能为空!');", true);
      *  TxtID.Focus();
      *  return false;
      * }
      * if (string.IsNullOrEmpty(TxtNumber.Text))
      * {
      *  ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('会议编号不能为空!');", true);
      *  TxtNumber.Focus();
      *  return false;
      * }*/
     if (string.IsNullOrEmpty(TxtArriveTime.Text))
     {
         ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('到达时间不能为空!');", true);
         TxtArriveTime.Focus();
         return(false);
     }
     if (string.IsNullOrEmpty(TxtArriveWay.Text))
     {
         ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('到达方式不能为空!');", true);
         TxtArriveWay.Focus();
         return(false);
     }
     if (string.IsNullOrEmpty(TxtLeaveTime.Text))
     {
         ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('离开时间不能为空!');", true);
         TxtLeaveTime.Focus();
         return(false);
     }
     if (string.IsNullOrEmpty(TxtLeaveWay.Text))
     {
         ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('离开方式不能为空!');", true);
         TxtLeaveWay.Focus();
         return(false);
     }
     if (string.IsNullOrEmpty(TxtHotelName.Text))
     {
         ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('宾馆名称不能为空!');", true);
         TxtHotelName.Focus();
         return(false);
     }
     if (string.IsNullOrEmpty(TxtRoomNumber.Text))
     {
         ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('房间号不能为空!');", true);
         TxtRoomNumber.Focus();
         return(false);
     }
     return(true);
 }
 private void BtnClear_Click(object sender, EventArgs e)
 {
     TxtTcnumber.Clear();
     TxtName.Clear();
     TxtSurname.Clear();
     TxtAddress.Clear();
     TxtDays.Clear();
     MskTxtPhoneNumber.Clear();
     TxtEmail.Clear();
     TxtPayment.Clear();
     TxtRoomNumber.Clear();
     dateTimePicker1.ResetText();
     DtpCheckin.ResetText();
     DtpCheckout.ResetText();
 }