예제 #1
0
    //提交数据处理
    void Button1_Click(object sender, EventArgs e)
    {
        String    sname1 = this.sname.SelectedValue;
        String    kind1  = this.kind.SelectedValue;
        string    id1    = Request.QueryString["id"];
        CommTable comm1  = new CommTable("U_LawZC");

        Hashtable ht1 = new Hashtable();

        ht1["sname"]    = sname1;
        ht1["kind"]     = kind1;
        ht1["dotime"]   = DateTime.Now.ToString();
        ht1["checkmen"] = Page.User.Identity.Name;
        if (String.IsNullOrEmpty(id1) == false)
        {
            List <SearchField> condition = new List <SearchField>();
            condition.Add(new SearchField("id", id1, SearchFieldType.数值型));
            comm1.EditQuickData(condition, ht1);
        }
        else
        {
            comm1.InsertData(ht1);
        }
        comm1.Close();
        Response.Redirect("FixLawGwList.aspx", true);
    }
예제 #2
0
    private void BindData()
    {
        int       totalRow = 0;
        CommTable comm1    = new CommTable();

        comm1.TabName = "ZX_QuickTalk";
        List <SearchField> list1 = new List <SearchField>();

        list1.Add(new SearchField("tmen", User.Identity.Name));
        DataSet ds1 = comm1.SearchData("*", list1, "id desc", 1, -1, out totalRow);

        this.GridView1.DataSource = ds1;
        this.GridView1.DataBind();

        //隐藏删除等控件
        if (totalRow > 0)
        {
            this.info2.Visible = true;
        }
        else
        {
            this.info2.Visible = false;
        }

        //将所有的短消息设置为已读
        list1.Add(new SearchField("isRead", "0"));
        Hashtable ht = new Hashtable();

        ht["isRead"] = "1";
        comm1.EditQuickData(list1, ht);
        comm1.Close();
    }
예제 #3
0
        /// <summary>
        /// 修改审批表数据
        /// </summary>
        /// <param name="data">数据</param>
        /// <param name="id">ID</param>
        /// <returns></returns>
        public void  EditData(Hashtable data, String id)
        {
            CommTable          com1      = new CommTable("U_ZC2");
            List <SearchField> condition = new List <SearchField>();

            condition.Add(new SearchField("id", id));
            com1.EditQuickData(condition, data);
            com1.Close();
        }
예제 #4
0
    //执行数据处理
    protected void Button2_Click(object sender, EventArgs e)
    {
        CommTable comm1 = new CommTable();

        comm1.TableConnect.BeginTrans();
        try
        {
            comm1.TabName = "U_ZCTC";
            Hashtable data = new Hashtable();
            data["zcid"]   = Request["zcid"];
            data["czid"]   = Request["czid"];
            data["time0"]  = DateTime.Now.ToString();
            data["remark"] = this.remark.Text;
            data["didian"] = this.didian.Text;
            data["jieguo"] = this.jieguo.Text;
            data["kind"]   = Request["kind"];
            data["zeren"]  = User.Identity.Name;
            comm1.InsertData(data);

            //更新U_ZC和U_ZC2中的相关状态数据
            if (Request["kind"] != null)
            {
                SearchField search0 = new SearchField("id", Request["zcid"]);
                comm1.TabName = "U_ZC";
                Hashtable ht = new Hashtable();
                ht["status"] = Request["kind"].Trim();
                comm1.EditQuickData(search0, ht);

                comm1.TabName = "U_ZC2";
                search0       = new SearchField("id", Request["czid"]);
                comm1.EditQuickData(search0, ht);
            }
            comm1.TableConnect.CommitTrans();
            this.Button1_Click(sender, e);
        }
        catch (Exception err)
        {
            comm1.TableConnect.RollBackTrans();
            JSJ.SysFrame.Util.alert(this.Page, "错误:数据库事务错误,请重试!");
        }

        comm1.Close();
    }
예제 #5
0
    private void BindData()
    {
        CommTable          comm1 = new CommTable("ZX_QuickTalk");
        List <SearchField> list1 = new List <SearchField>();

        list1.Add(new SearchField("tmen", User.Identity.Name));
        list1.Add(new SearchField("isRead", "0"));
        DataSet ds1 = comm1.SearchData("*", list1, "id desc");

        //修改信息为已读
        Hashtable ht = new Hashtable();

        ht["isread"] = "1";
        comm1.EditQuickData(list1, ht);
        comm1.Close();
        this.Repeater1.DataSource = ds1;
        this.Repeater1.DataBind();
    }
예제 #6
0
    //更新用户的数据状态
    private void SetUserNameStatus(String userNames, String status)
    {
        CommTable comm1 = new CommTable();

        comm1.TabName = "U_UserName";
        List <SearchField> condition = new List <SearchField>();

        condition.Add(new SearchField("sname", userNames, SearchOperator.集合));
        Hashtable ht1 = new Hashtable();

        if (String.IsNullOrEmpty(status) == false)
        {
            ht1.Add("lockflag", "1");
        }
        else
        {
            ht1.Add("lockflag", DBNull.Value);
        }
        comm1.EditQuickData(condition, ht1);
        comm1.Close();
    }
예제 #7
0
    //将数据保存
    protected void btn1_Click(object sender, EventArgs e)
    {
        CommTable comm1 = new CommTable();

        comm1.TabName = "ZX_RCAP";

        //保存老的数据
        if (this.id.Value == "")
        {
            Hashtable ht = new Hashtable();
            ht["time0"] = DateTime.Now.ToString();
            ht["sname"] = User.Identity.Name;
            U_UserNameBU user1 = new U_UserNameBU();
            ht["depart"] = user1.GetDepart1(User.Identity.Name);
            user1.Close();

            ht["plantime"] = this.plantime.Text;
            ht["subject"]  = Util.GetMaxLenth(this.subject.Text, 90);
            ht["remark"]   = this.remark.Text;
            comm1.InsertData(ht);
        }
        else
        {
            string             infoid = this.id.Value;
            List <SearchField> list1  = new List <SearchField>();
            list1.Add(new SearchField("id", infoid, SearchFieldType.数值型));
            list1.Add(new SearchField("sname", User.Identity.Name));

            Hashtable ht = new Hashtable();
            ht["plantime"] = this.plantime.Text;
            ht["subject"]  = Util.GetMaxLenth(this.subject.Text, 90);
            ht["remark"]   = this.remark.Text;
            comm1.EditQuickData(list1, ht);
        }
        comm1.Close();
        Response.Redirect("MyRcaiPai.aspx", true);
    }
예제 #8
0
    protected void button1_Click(object sender, EventArgs e)
    {
        String             id1       = Request.QueryString["id"];
        CommTable          comm1     = new CommTable("u_zctc");
        Hashtable          ht1       = new Hashtable();
        List <SearchField> condition = new List <SearchField>();

        condition.Add(new SearchField("id", id1, SearchFieldType.数值型));

        if (this.leader_remark.Text.Trim() != String.Empty)
        {
            ht1["leader_remark"] = this.leader_remark.Text.Trim();
            ht1["leader_name"]   = Page.User.Identity.Name;
            ht1["leader_time"]   = DateTime.Now.ToString();
        }
        else
        {
            ht1["leader_remark"] = null;
            ht1["leader_name"]   = null;
            ht1["leader_time"]   = null;
        }
        comm1.EditQuickData(condition, ht1);
        Util.alert(this.Page, "提示:操作成功!", true);
    }
예제 #9
0
    //重新设置审批流程
    protected void Button5_Click(object sender, EventArgs e)
    {
        CommTable comm1 = new CommTable();

        ////////////////////////////////////////////////////////////////
        comm1.TabName = "U_ZC2";
        List <SearchField> condition = new List <SearchField>();

        condition.Add(new SearchField("id", Request["id"], SearchFieldType.数值型));
        Hashtable ht = new Hashtable();

        ht["status"] = "04";
        comm1.EditQuickData(condition, ht);


        ////////////////////////////////////////////////////////////////
        comm1.TabName = "U_ZCSP";
        condition.Clear();
        condition.Add(new SearchField("CZID", Request["id"], SearchFieldType.数值型));
        comm1.DeleteData(condition);
        comm1.Close();

        Response.Redirect(Request.PathInfo, true);
    }