private void txt_yezhu_Leave(object sender, EventArgs e)
 {
     if (Form_Type == 0 || Form_Type == 1)
     {
         txt_yezhu.Tag = "0";
         if (txt_yezhu.Text == "")
         {
             lab_m_yezhu.Text      = "请输入业主ID!";
             lab_m_yezhu.ForeColor = Color.Red;
         }
         else
         {
             if (Input_Regex.IsNum(txt_yezhu.Text))
             {
                 if (zhuangtai.YezhuName(txt_yezhu.Text.Trim(), true) != "")
                 {
                     lab_m_yezhu.Text      = "该ID业主为:" + zhuangtai.YezhuName(txt_yezhu.Text.Trim(), true);
                     lab_m_yezhu.ForeColor = Color.Black;
                     txt_yezhu.Tag         = "1";
                 }
                 else
                 {
                     lab_m_yezhu.Text      = "业主ID不存在!";
                     lab_m_yezhu.ForeColor = Color.Red;
                 }
             }
             else
             {
                 lab_m_yezhu.Text      = "业主ID只能为数字!";
                 lab_m_yezhu.ForeColor = Color.Red;
             }
         }
     }
 }
 private void txt_jine_Leave(object sender, EventArgs e)
 {
     if (Form_Type == 3)
     {
         return;
     }
     else
     {
         txt_jine.Tag = "0";
         if (txt_jine.Text == "")
         {
             lab_m_jine.Text      = "金额不能为空!";
             lab_m_jine.ForeColor = Color.Red;
         }
         else
         {
             if (Input_Regex.IsNum(txt_jine.Text))
             {
                 lab_m_jine.Text = "";
                 txt_jine.Tag    = "1";
             }
             else
             {
                 lab_m_jine.Text      = "金额只能为数字!";
                 lab_m_jine.ForeColor = Color.Red;
             }
         }
     }
 }
 private void txt_shoufei_Leave(object sender, EventArgs e)
 {
     if (Form_Type == 3)
     {
         txt_shoufei.Tag = "0";
         if (txt_shoufei.Text == "")
         {
             lab_m_shoufei.Text    = "请输入收费金额的信息!";
             lab_m_yezhu.ForeColor = Color.Red;
         }
         else
         {
             if (Input_Regex.IsNum(txt_shoufei.Text))
             {
                 lab_m_shoufei.Text = "";
                 txt_shoufei.Tag    = "1";
             }
             else
             {
                 lab_m_shoufei.Text      = "收费金额只能为数字!";
                 lab_m_shoufei.ForeColor = Color.Red;
             }
         }
     }
 }
 private void txt_yuangong_Leave(object sender, EventArgs e)
 {
     if (Form_Type == 2)
     {
         txt_yuangong.Tag = "0";
         if (txt_yuangong.Text == "")
         {
             lab_m_yuangong.Text      = "请输入员工主ID!";
             lab_m_yuangong.ForeColor = Color.Red;
         }
         else
         {
             if (Input_Regex.IsNum(txt_yuangong.Text))
             {
                 if (zhuangtai.YuangongName(txt_yuangong.Text.Trim(), true) != "")
                 {
                     lab_m_yuangong.Text      = "该ID员工为:" + zhuangtai.YuangongName(txt_yuangong.Text.Trim(), true);
                     lab_m_yuangong.ForeColor = Color.Black;
                     txt_yuangong.Tag         = "1";
                 }
                 else
                 {
                     lab_m_yuangong.Text      = "员工ID不存在!";
                     lab_m_yuangong.ForeColor = Color.Red;
                 }
             }
             else
             {
                 lab_m_yuangong.Text      = "员工ID只能为数字!";
                 lab_m_yuangong.ForeColor = Color.Red;
             }
         }
     }
 }
 private void txt_fuzeren_Leave(object sender, EventArgs e)
 {
     txt_fuzeren.Tag = 0;
     if (txt_fuzeren.Text == "")
     {
         lab_m_fuzeren.Text      = "负责人ID不能为空!";
         lab_m_fuzeren.ForeColor = Color.Red;
     }
     else
     {
         if (Input_Regex.IsNum(txt_fuzeren.Text))
         {
             DataSet   DSet = SQLClass.getDataSet("select xingming from yuangong where id = '" + txt_fuzeren.Text + "'", "员工信息表");
             DataTable dt   = DSet.Tables["员工信息表"];
             if (dt.Rows.Count > 0)
             {
                 lab_m_fuzeren.Text      = "你输入负责人ID为:" + dt.Rows[0][0].ToString();
                 txt_fuzeren.Tag         = 1;
                 lab_m_fuzeren.ForeColor = Color.Black;
             }
             else
             {
                 lab_m_fuzeren.Text      = "该负责人ID不存在,请重新输入!";
                 lab_m_fuzeren.ForeColor = Color.Red;
             }
         }
         else
         {
             lab_m_fuzeren.Text      = "负责人ID只能为数字!";
             lab_m_fuzeren.ForeColor = Color.Red;
         }
     }
 }
 private void txt_yuangong_Leave(object sender, EventArgs e)
 {
     if (Form_Type == 3)
     {
         txt_yuangong.Tag = "0";
         if (txt_yuangong.Text == "")
         {
             lab_m_yuangong.Text      = "请输入员工ID!";
             lab_m_yuangong.ForeColor = Color.Red;
         }
         else
         {
             if (Input_Regex.IsNum(txt_yuangong.Text))
             {
                 DataSet   ygDSet = SQLClass.getDataSet("select xingming from yuangong where id = '" + txt_yuangong.Text.Trim() + "'", "员工信息表");
                 DataTable ygdt   = ygDSet.Tables["员工信息表"];
                 if (ygdt.Rows.Count > 0)
                 {
                     lab_m_yuangong.Text      = "你输入的员工名称为:" + ygdt.Rows[0][0].ToString();
                     lab_m_yuangong.ForeColor = Color.Black;
                     txt_yuangong.Tag         = "1";
                 }
                 else
                 {
                     lab_m_yuangong.Text      = "你输入的员工ID不存在!";
                     lab_m_yuangong.ForeColor = Color.Red;
                 }
             }
             else
             {
                 lab_m_yuangong.Text      = "员工ID只能为数字!";
                 lab_m_yuangong.ForeColor = Color.Red;
             }
         }
     }
     else
     {
         //lab_m_yuangong.Text = "未知错误!";
         //lab_m_yuangong.ForeColor = Color.Red;
     }
 }
 private void txt_shoufei_Leave(object sender, EventArgs e)
 {
     txt_shoufei.Tag = 0;
     if (txt_shoufei.Text == "")
     {
         lab_m_shoufei.Text      = "收费信息不能为空!";
         lab_m_shoufei.ForeColor = Color.Red;
     }
     else
     {
         if (Input_Regex.IsNum(txt_shoufei.Text))
         {
             lab_m_shoufei.Text = "";
             txt_shoufei.Tag    = 1;
         }
         else
         {
             lab_m_shoufei.Text      = "费用信息只能为数字!";
             lab_m_shoufei.ForeColor = Color.Red;
         }
     }
 }
 private void txt_yezhu_Leave(object sender, EventArgs e)
 {
     if (Form_Type == 0 || Form_Type == 1 || Form_Type == 2)
     {
         return;
     }
     txt_yezhu.Tag = "0";
     if (txt_yezhu.Text != "")
     {
         if (Input_Regex.IsNum(txt_yezhu.Text.Trim()))
         {
             DataSet   yzDSet = SQLClass.getDataSet("select xingming,feiyong from yezhu where id = '" + txt_yezhu.Text.ToString().Trim() + "'", "业主信息表");
             DataTable yzdt   = yzDSet.Tables["业主信息表"];
             if (yzdt.Rows.Count > 0)
             {
                 lab_m_yezhu.Text = "该业主ID为:" + yzdt.Rows[0][0].ToString();
                 yzfy             = Convert.ToInt32(yzdt.Rows[0][1].ToString());
                 txt_yezhu.Tag    = 1;
             }
             else
             {
                 lab_m_yezhu.Text      = "该业主不存在,请返回修改!";
                 lab_m_yezhu.ForeColor = Color.Red;
             }
         }
         else
         {
             lab_m_yezhu.Text      = "业主ID只能为数字,请返回修改!";
             lab_m_yezhu.ForeColor = Color.Red;
         }
     }
     else
     {
         lab_m_yezhu.Text      = "业主不能为空,请返回修改!";
         lab_m_yezhu.ForeColor = Color.Red;
     }
 }
 private void txt_yezhu_Leave(object sender, EventArgs e)
 {
     if (Form_Type == 0 || Form_Type == 1)
     {
         txt_yezhu.Tag = "0";
         if (txt_yezhu.Text == "")
         {
             lab_m_yezhu.Text      = "请输入业主ID!";
             lab_m_yezhu.ForeColor = Color.Red;
         }
         else
         {
             if (Input_Regex.IsNum(txt_yezhu.Text))
             {
                 DataSet   yzDSet = SQLClass.getDataSet("select xingming from yezhu where id = '" + txt_yezhu.Text + "'", "业主信息表");
                 DataTable yzdt   = yzDSet.Tables["业主信息表"];
                 if (yzdt.Rows.Count > 0)
                 {
                     lab_m_yezhu.Text      = "你输入的业主名称为:" + yzdt.Rows[0][0].ToString();
                     lab_m_yezhu.ForeColor = Color.Black;
                     txt_yezhu.Tag         = "1";
                 }
                 else
                 {
                     lab_m_yezhu.Text      = "你输入的业主ID不存在!";
                     lab_m_yezhu.ForeColor = Color.Red;
                 }
             }
             else
             {
                 lab_m_yezhu.Text      = "业主ID只能为数字!";
                 lab_m_yezhu.ForeColor = Color.Red;
             }
         }
     }
 }