示例#1
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     if (TextBox1.Text.Trim() == "")
     {
         ComTool.Alert("请输入设备编号!");
     }
     else if (TextBox2.Text.Trim() == "")
     {
         ComTool.Alert("请输入设备状态!");
     }
     else
     {
         huiyi obj = new huiyi();
         obj.huiyiname = TextBox1.Text;
         obj.yuyue     = TextBox2.Text;
         if (huiyi.updateRecord(obj) == 1)
         {
             ComTool.Alert("更新成功!");
             ComTool.Redirect("huiyiListListM.aspx");
         }
         else
         {
             ComTool.Alert("更新失败!");
         }
     }
 }
示例#2
0
    protected void B1Click(object sender, EventArgs e)
    {
        if (hyname.Text.Trim() == "")
        {
            ComTool.Alert("请输入会议室名!");
        }
        else if (shijian.Text.Trim() == "")
        {
            ComTool.Alert("请输入预约时间 !");
        }
        else
        {
            yuyuehuiyi obj = searchCon();

            if (obj.yuyue == "0")
            {
                int i = yuyuehuiyi.insertshenqingRecord(obj);
                if (i != 0)
                {
                    ComTool.Alert("预约单提交成功!等待管理员审核!");

                    ComTool.Redirect("huiyiList.aspx");
                }
                else
                {
                    ComTool.Alert("预约单提交失败!请再次提交!");
                }
            }

            else
            {
                ComTool.Alert("会议室已被他人预约!");
            }
        }
    }
示例#3
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     if (TextBox1.Text.Trim() == "")
     {
         ComTool.Alert("请输入设备编号!");
     }
     else if (TextBox2.Text.Trim() == "")
     {
         ComTool.Alert("请输入设备状态!");
     }
     else
     {
         Equip obj = new Equip();
         obj.equipcode = TextBox1.Text;
         obj.status    = TextBox2.Text;
         if (Equip.updateRecord(obj) == 1)
         {
             ComTool.Alert("更新成功!");
             ComTool.Redirect("EquipListM.aspx");
         }
         else
         {
             ComTool.Alert("更新失败!");
         }
     }
 }
示例#4
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (TextBox1.Text.Trim() == "")
     {
         ComTool.Alert("请输入设备编号");
     }
     else if (TextBox2.Text.Trim() == "")
     {
         ComTool.Alert("请输入管理员姓名!");
     }
     else if (TextBox3.Text.Trim() == "")
     {
         ComTool.Alert("请输入维修日期!");
     }
     else
     {
         Equiprecord obj = new Equiprecord();
         obj.equipid    = Convert.ToInt64(TextBox1.Text);
         obj.adminname  = TextBox2.Text;
         obj.recorddate = DateTime.Parse(TextBox3.Text);
         if (Equiprecord.insertRecord(obj) == 1)
         {
             ComTool.Alert("新增成功!");
             ComTool.Redirect("recordview.aspx");
         }
         else
         {
             ComTool.Alert("新增失败!");
         }
     }
 }
示例#5
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (tbxUserName.Text.Trim() == "")
     {
         ComTool.Alert("请输入用户名!");
     }
     else if (tbxUserPWD.Text.Trim() == "")
     {
         ComTool.Alert("请输入密码!");
     }
     else
     {
         Users obj = new Users();
         obj.username = tbxUserName.Text;
         obj.userpwd  = tbxUserPWD.Text;
         if (Users.selectDataTable(obj).Rows.Count == 0 && Users.insertRecord(obj) == 1)
         {
             ComTool.Alert("注册成功!");
             ComTool.Redirect("Default.aspx");
         }
         else
         {
             ComTool.Alert("用户名已存在!");
         }
     }
 }
示例#6
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (tbxUserName.Text.Trim() == "")
     {
         ComTool.Alert("请输入会议室名称!");
     }
     else if (tbxUserPWD.Text.Trim() == "")
     {
         ComTool.Alert("请输入会议室位置!");
     }
     else if (TextBox2.Text.Trim() == "")
     {
         ComTool.Alert("请输入会议室状态!");
     }
     else
     {
         huiyi obj = new huiyi();
         obj.huiyiname = tbxUserName.Text;
         obj.didian    = tbxUserPWD.Text;
         obj.yuyue     = TextBox2.Text;
         if (huiyi.insertRecord(obj) == 1)
         {
             ComTool.Alert("新增成功!");
             ComTool.Redirect("huiyiListM.aspx");
         }
         else
         {
             ComTool.Alert("新增失败!");
         }
     }
 }
示例#7
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (tbxManagerName.Text.Trim() == "")
     {
         ComTool.Alert("请输入用户名!");
     }
     else if (tbxManagerPWD.Text.Trim() == "")
     {
         ComTool.Alert("请输入密码!");
     }
     else if (tbxManagerTel.Text.Trim() == "")
     {
         ComTool.Alert("请输入联系方式!");
     }
     else
     {
         Manager obj = new Manager();
         obj.managername = tbxManagerName.Text;
         obj.managerpwd  = tbxManagerPWD.Text;
         obj.telephone   = tbxManagerTel.Text;
         if (Manager.selectDataTable(obj).Rows.Count == 0 && Manager.insertRecord(obj) == 1)
         {
             ComTool.Alert("注册成功!");
             ComTool.Redirect("DefaultM.aspx");
         }
         else
         {
             ComTool.Alert("用户名已存在!");
         }
     }
 }
示例#8
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        Users obj = new Users();

        obj.username = TextBox1.Text;
        obj.userpwd  = TextBox2.Text;
        if (Users.ifLogin(obj))
        {
            ComTool.Redirect("UsersList.aspx");
        }
        else
        {
            ComTool.Alert("用户名或密码错误!");
        }
    }
示例#9
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        myUser obj = new myUser();

        obj.username  = UserName.Text.Trim();
        obj.userkey   = Password.Text.Trim();
        obj.userphone = Phone.Text.Trim();
        if (myUser.selectDataTable(obj).Rows.Count != 0)
        {
            ComTool.Alert("注册失败,该用户名已存在!");
        }
        else if (myUser.insertRecord(obj) == 1)
        {
            ComTool.Alert("注册成功!");
            ComTool.Redirect(" Default.aspx");
        }
    }
示例#10
0
    protected void gvcourse_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        roomBook obj = new roomBook();
        int      i   = roomBook.updateRecord(" update roombook set review='true' where bookid=" + e.CommandArgument.ToString());
        int      j   = roomBook.updateRecord(" update roombook set adminname='管理员' where bookid=" + e.CommandArgument.ToString());

        if (i == 1 & j == 1)
        {
            ComTool.Alert("审核成功!");
            BindData1();
            ComTool.Redirect("bookreview.aspx");
        }
        else
        {
            ComTool.Alert("审核失败!");
            ComTool.Redirect("bookreview.aspx");
        }
    }
示例#11
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (UserName.Text.Trim() == "")
     {
         ComTool.Alert("请输入用户名!");
     }
     else if (Password.Text.Trim() == "")
     {
         ComTool.Alert("请输入密码!");
     }
     else
     {
         if (Int32.Parse(DropDownList1.SelectedItem.Value) == 0)
         {
             Admin obj = new Admin();
             obj.adminname = UserName.Text;
             obj.adminkey  = Password.Text;
             if (Admin.ifLogin(obj))
             {
                 ComTool.Alert("登陆成功!");
                 ComTool.Redirect("aroomstate.aspx");
             }
             else
             {
                 ComTool.Alert("登陆失败!");
             }
         }
         else if (Int32.Parse(DropDownList1.SelectedItem.Value) == 1)
         {
             myUser obj = new myUser();
             obj.username = UserName.Text;
             obj.userkey  = Password.Text;
             if (myUser.ifLogin(obj))
             {
                 ComTool.Alert("登陆成功!");
                 ComTool.Redirect("uroomstate.aspx");
             }
             else
             {
                 ComTool.Alert("登陆失败!");
             }
         }
     }
 }
示例#12
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        Users obj = new Users();

        obj.username = TextBox1.Text;
        obj.userpwd  = TextBox2.Text;
        if (Users.ifLogin(obj))
        {
            ComTool.Redirect("ManagerList.aspx");
        }
        else if (Users.selectDataTable(obj).Rows.Count == 0)
        {
            ComTool.Alert("用户名未注册,请先注册!");
        }
        else
        {
            ComTool.Alert("密码错误!");
        }
    }
示例#13
0
 protected void ADSubmit_Click(object sender, EventArgs e)
 {
     if (txtADRID.Text.Trim() == "" || txtADRPwd.Text.Trim() == "" || txtADRPwdAgain.Text.Trim() == "")
     {
         ComTool.Alert("请输入全部注册信息后点击登录!");
     }
     else if (txtADRPwd.Text.Trim() != txtADRPwdAgain.Text.Trim())
     {
         ComTool.Alert("您两次输入密码不一致,请重新输入!");
     }
     else
     {
         string strSQL = "insert into 管理员表(AdminID,AdminPwd) values('" + txtADRID.Text + "','" + txtADRPwd.Text + "')";
         if (DBOper.execNonQueryBySQLText(strSQL) == 1)//调用公共类
         {
             ComTool.Redirect("AdminLogin.aspx");
         }
     }
 }
示例#14
0
    protected void btnScoreAgain_Click(object sender, EventArgs e)
    {
        string    STRC   = "";
        string    strSQL = "select TransID from 传值表";
        DataTable DDT    = DBOper.execQueryBySQLText(strSQL);

        if (DDT.Rows.Count > 0)
        {
            STRC = DDT.Rows[0]["TransID"].ToString();
        }
        if (STRC == txtgroup.Text)
        {
            ComTool.Alert("尚未创建新组,请稍后!");
        }
        else
        {
            ComTool.Redirect("Score.aspx?A=" + txtCNO.Text);
        }
    }
示例#15
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     if (txtCID.Text.Trim() == "" || txtPwd.Text.Trim() == "" || txtPwdAgain.Text.Trim() == "" || txtAge.Text.Trim() == "" || rdlRole.SelectedValue.Trim() == "" || txtUserName.Text.Trim() == "")
     {
         ComTool.Alert("请输入全部注册信息后点击登录!");
     }
     else if (txtPwd.Text.Trim() != txtPwdAgain.Text.Trim())
     {
         ComTool.Alert("您两次输入密码不一致,请重新输入!");
     }
     else
     {
         string strSQL = "insert into 用户表(URID,CID,Name,Pwd) values('" + rdlRole.SelectedValue + "','" + txtCID.Text + "','" + txtUserName.Text + "','" + txtPwd.Text + "')";
         if (DBOper.execNonQueryBySQLText(strSQL) == 1)//调用公共类
         {
             ComTool.Redirect("Login.aspx");
         }
     }
 }
示例#16
0
    protected void btnLog_Click(object sender, EventArgs e)
    {
        if (txtADRID.Text.Trim() == "" || txtADRPwd.Text.Trim() == "")
        {
            ComTool.Alert("请输账号或密码!");
        }
        else
        {
            bool   blRet  = false;
            string strSQL = "select * from 管理员表 where AdminID='" + txtADRID.Text + "'"
                            + " and AdminPwd='" + txtADRPwd.Text + "'";

            DataTable 管理员表 = DBOper.execQueryBySQLText(strSQL);
            try
            {
                if (管理员表.Rows.Count > 0)
                {
                    blRet = true;
                }
                else
                {
                    blRet = false;
                }
            }
            catch
            {
                blRet = false;
            }
            if (blRet)
            {
                ComTool.Redirect("DesGroup.aspx");
            }
            else
            {
                ComTool.Alert("学/工号或密码错误!");
            }
        }
    }
示例#17
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (txtUserName.Text.Trim() == "" || txtPwd.Text.Trim() == "")
        {
            ComTool.Alert("请输入学/工号或密码!");
        }
        else
        {
            bool   blRet  = false;
            string strSQL = "select * from 用户表 where CID='" + txtUserName.Text + "'"
                            + " and pwd='" + txtPwd.Text + "'";

            DataTable 用户表 = DBOper.execQueryBySQLText(strSQL);
            try
            {
                if (用户表.Rows.Count > 0)
                {
                    blRet = true;
                }
                else
                {
                    blRet = false;
                }
            }
            catch
            {
                blRet = false;
            }
            if (blRet)
            {
                ComTool.Redirect("Score.aspx?A=" + txtUserName.Text);    //明文参数传值,不安全。
            }
            else
            {
                ComTool.Alert("学/工号或密码错误!");
            }
        }
    }
示例#18
0
 protected void add_Click(object sender, EventArgs e)
 {
     if (TextBox3.Text.Trim() == "")
     {
         ComTool.Alert("请输入用户名!");
     }
     else if (TextBox4.Text.Trim() == "")
     {
         ComTool.Alert("请输入要预约的会议室!");
     }
     else if (TextBox1.Text.Trim() == "")
     {
         ComTool.Alert("请输入会议开始时间!");
     }
     else if (TextBox2.Text.Trim() == "")
     {
         ComTool.Alert("请输入会议结束时间!");
     }
     else
     {
         roomBook obj = new roomBook();
         obj.username  = TextBox3.Text;
         obj.roomid    = TextBox4.Text;
         obj.begintime = DateTime.Parse(TextBox1.Text);
         obj.endtime   = DateTime.Parse(TextBox2.Text);
         if (roomBook.insertRecord(obj) == 1)
         {
             ComTool.Alert("预约成功!");
             ComTool.Redirect("bookview.aspx");
         }
         else
         {
             ComTool.Alert("预约失败!");
         }
     }
 }
示例#19
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (TextBox1.Text.Trim() == "")
     {
         ComTool.Alert("请输入设备编号!");
     }
     else if (tbxUserName.Text.Trim() == "")
     {
         ComTool.Alert("请输入设备名称!");
     }
     else if (tbxUserPWD.Text.Trim() == "")
     {
         ComTool.Alert("请输入设备所在位置!");
     }
     else if (TextBox2.Text.Trim() == "")
     {
         ComTool.Alert("请输入设备状态!");
     }
     else
     {
         Equip obj = new Equip();
         obj.equipcode = TextBox1.Text;
         obj.equipname = tbxUserName.Text;
         obj.location  = tbxUserPWD.Text;
         obj.status    = TextBox2.Text;
         if (Equip.selectcon(obj).Rows.Count == 0 && Equip.insertRecord(obj) == 1)
         {
             ComTool.Alert("新增成功!");
             ComTool.Redirect("EquipListM.aspx");
         }
         else
         {
             ComTool.Alert("编号重复!");
         }
     }
 }
示例#20
0
 protected void B2Click(object sender, EventArgs e)
 {
     ComTool.Redirect("huiyiList.aspx");
 }
示例#21
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     ComTool.Redirect("UserM.aspx");
 }
示例#22
0
 protected void btndegroup_Click(object sender, EventArgs e)
 {
     ComTool.Redirect("DesGroup.aspx?C=" + txtGROUP.Text);
 }
示例#23
0
 protected void btnclear_Click(object sender, EventArgs e)
 {
     ComTool.Redirect("CheckSubmit.aspx?B=" + txtGROUP.Text);
 }
示例#24
0
 protected void LinkButton1_Click(object sender, EventArgs e)
 {
     ComTool.Redirect("huiyiListMM.aspx");
 }
示例#25
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     ComTool.Redirect("equiprecord.aspx");
 }
示例#26
0
 protected void Buttoni_Click(object sender, EventArgs e)
 {
     ComTool.Redirect("insert1.aspx");
 }
示例#27
0
 protected void Button0_Click(object sender, EventArgs e)
 {
     ComTool.Redirect("EquipListM.aspx");
 }
示例#28
0
 protected void btnReg_Click(object sender, EventArgs e)
 {
     ComTool.Redirect("AdminRegist.aspx");
 }
示例#29
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     ComTool.Redirect("dealpicture.aspx");
 }
示例#30
0
 protected void LinkButton1_Click(object sender, EventArgs e)
 {
     ComTool.Redirect("DefaultM.aspx");
 }