Пример #1
0
    public static int deleteshenqingRecord(yuyuehuiyi obj)
    {
        string strSQL = "delete from shenqinghuiyi where huiyiname='" + obj.huiyiname + "'";
        int    iRet   = DBOper.execNonQueryBySQLText(strSQL);

        return(iRet);
    }
Пример #2
0
    //public static int delRecord(yuyuehuiyi obj)
    //{
    //    string strSQL = "delete from shenqinghuiyi where huiyiid='" + obj.huiyiid + "'";
    //    int iRet = DBOper.execNonQueryBySQLText(strSQL);
    //    return iRet;
    //}
    public static int updateshenheRecord(yuyuehuiyi obj)
    {
        string strSQL = "update shenqinghuiyi set shenhe='" + "1" + "' where huiyiname='" + obj.huiyiname + "'";
        int    iRet   = DBOper.execNonQueryBySQLText(strSQL);

        return(iRet);
    }
Пример #3
0
    public static DataTable huiyishenqingqb(yuyuehuiyi hy)
    {
        string    str = "select * from shenqinghuiyi where 1=1 ";
        DataTable dt  = DBOper.execQueryBySQLText(str);

        return(dt);
    }
Пример #4
0
    public static int insertshenqingRecord(yuyuehuiyi obj)
    {
        string strSQL = "insert into shenqinghuiyi(huiyiname,shijian,shenhe) values('" + obj.huiyiname + "','" + obj.shijian + "','" + "0" + "')";
        int    iRet   = DBOper.execNonQueryBySQLText(strSQL);

        return(iRet);
    }
Пример #5
0
    private void BindData(yuyuehuiyi obj)
    {
        DataTable dt = yuyuehuiyi.selecthuiyishenqing(obj);

        gvcourse.DataSource = dt;
        gvcourse.DataBind();
    }
Пример #6
0
    private void BindData2(yuyuehuiyi obj)
    {
        DataTable dt = yuyuehuiyi.selectyuyueshijian(obj);

        gvcourse.DataSource = dt;
        gvcourse.DataBind();
    }
Пример #7
0
    private yuyuehuiyi searchCon2()
    {
        yuyuehuiyi obj = new yuyuehuiyi();

        obj.shijian = TB2.Text.Trim();
        return(obj);
    }
Пример #8
0
    private yuyuehuiyi searchCon1()
    {
        yuyuehuiyi obj = new yuyuehuiyi();

        obj.huiyiname = TB.Text.Trim();
        return(obj);
    }
Пример #9
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("会议室已被他人预约!");
            }
        }
    }
Пример #10
0
    private void BindData3()
    {
        yuyuehuiyi obj = new yuyuehuiyi();
        DataTable  dt  = yuyuehuiyi.huiyishenqingqb(obj);

        gvcourse.DataSource = dt;
        gvcourse.DataBind();
    } //申请表全部
Пример #11
0
    public static DataTable selectyuyueshijian(yuyuehuiyi hy)
    {
        string str = "select * from tbhuiyi where 1=1 ";

        if (hy.shijian != "" && hy.shijian != null)
        {
            str = str + "and shijian='" + hy.shijian + "'";
        }

        DataTable dt = DBOper.execQueryBySQLText(str);

        return(dt);
    }
Пример #12
0
    public static DataTable selectshenhe(yuyuehuiyi hy)
    {
        string str = "select * from shenqinghuiyi where 1=1 ";

        if (hy.shenhe != "" && hy.shenhe != null)
        {
            str = str + "and shenhe='" + hy.shenhe + "'";
        }

        DataTable dt = DBOper.execQueryBySQLText(str);

        return(dt);
    }
Пример #13
0
    //private void BindData4(yuyuehuiyi obj)
    //{

    //    DataTable dt = yuyuehuiyi.update(obj);
    //    gvcourse.DataSource = dt;
    //    gvcourse.DataBind();
    //}

    protected void gvcourse_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        huiyi hy = new huiyi();

        hy.huiyiname = e.CommandArgument.ToString();
        huiyi.updateRecord(hy);//yuyue=1
        BindData5(hy);
        yuyuehuiyi obj = new yuyuehuiyi();

        obj.huiyiname = e.CommandArgument.ToString();
        yuyuehuiyi.updateshenheRecord(obj);
        BindData(obj);
    }
Пример #14
0
    private yuyuehuiyi searchCon()
    {
        huiyi h = new huiyi();

        h.huiyiname = hyname.Text.Trim();
        DataTable da = huiyi.selecthuiyi(h);

        yuyuehuiyi obj = new yuyuehuiyi();

        obj.huiyiname = hyname.Text.Trim();
        obj.shijian   = shijian.Text.Trim();
        obj.yuyue     = (string )da.Rows[0][2];
        return(obj);
    }
Пример #15
0
    protected void lbtndel_Click(object sender, EventArgs e)
    {
        for (int i = 0; i < gvcourse.Rows.Count; i++)
        {
            CheckBox cb = (CheckBox)gvcourse.Rows[i].FindControl("cbsel");
            if (cb.Checked)
            {
                string     name    = gvcourse.DataKeys[i].Value.ToString();
                yuyuehuiyi myhuiyi = new yuyuehuiyi();
                myhuiyi.huiyiname = name;
                yuyuehuiyi.deleteshenqingRecord(myhuiyi);
                BindData(myhuiyi);

                huiyi huiy = new huiyi();
                huiy.huiyiname = name;
                huiyi.quxiaoRecord(huiy);
                BindData5(huiy);
            }
        }
    }