Esempio n. 1
0
    private void BindTC(U_ZCTCBU tc1)
    {
        bool flag = false;

        if (tc1 == null)
        {
            tc1  = new U_ZCTCBU();
            flag = true;
        }

        for (int i = 1; i <= 4; i++)
        {
            Repeater repeater1 = this.Repeater1.Parent.FindControl("Repeater" + i) as Repeater;
            if (repeater1 != null)
            {
                DataSet ds1 = tc1.GetTCList("0" + i, Request["zcid"]);
                repeater1.DataSource = ds1;
                repeater1.DataBind();

                if (ds1.Tables[0].Rows.Count == 0)
                {
                    repeater1.Visible = false;
                }
            }
        }
        if (flag)
        {
            tc1.Close();
        }
    }
Esempio n. 2
0
    protected void Repeater1_DataBound(object sender, RepeaterItemEventArgs e)
    {
        Label lab1 = e.Item.FindControl("labDepart") as Label;

        if (lab1 != null)
        {
            U_ZCTCBU zctc1 = new U_ZCTCBU();
            DataSet  ds1   = zctc1.GetJZDCFromZCTC(this.BeginTime.Text, this.EndTime.Text, lab1.Text);
            zctc1.Close();
            bool first = false;
            for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
            {
                if (ds1.Tables[0].Rows[i]["count13"].ToString() != "0")
                {
                    first = true;
                }
            }
            GridView gridview1 = e.Item.FindControl("GridView1") as GridView;
            if (gridview1 != null)
            {
                gridview1.DataSource = ds1;
                gridview1.DataBind();
                if (first == false)
                {
                    gridview1.Visible = false;
                    //e.Item.Visible = false;
                }
            }
            gridview1.Dispose();
        }
    }
Esempio n. 3
0
 protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     if (e.Item.FindControl("seldoc") != null)
     {
         string   id  = ((Label)e.Item.FindControl("seldoc")).Text;
         U_ZCTCBU tc1 = new U_ZCTCBU();
         if (e.CommandName == "delete")
         {
             tc1.DelteTC(id);
             this.BindTC(tc1);
         }
         else if (e.CommandName == "update")
         {
             tc1.EditTcForstatus(id);
             this.BindTC(tc1);
         }
         else
         {
             bool first = tc1.CopyZcTctoZc(this.Bid.Text.Trim(), id, "0");
             if (first)
             {
                 Util.alert(this.Page, "恭喜您,复制成功!");
             }
             else
             {
                 Util.alert(this.Page, "很遗憾,复制失败!");
             }
             this.BindTC(tc1);
         }
         tc1.Close();
     }
 }
Esempio n. 4
0
 //删除(作废)执行情况文档
 protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     if (e.Item.FindControl("seldoc") != null)
     {
         string id = ((Label)e.Item.FindControl("seldoc")).Text;
         if (e.CommandName == "delete")
         {
             try
             {
                 U_ZCTCBU tc1 = new U_ZCTCBU();
                 tc1.DelteTC(id);
                 this.BindTC(tc1);
                 tc1.Close();
             }
             catch (Exception err1)
             {
                 Util.alert(this.Page, err1.Message);
             }
         }
         else
         {
             try
             {
                 U_ZCTCBU tc2 = new U_ZCTCBU();
                 tc2.EditTcForstatus(id);
                 this.BindTC(tc2);
                 tc2.Close();
             }
             catch (Exception err1)
             {
                 Util.alert(this.Page, err1.Message);
             }
         }
     }
 }
Esempio n. 5
0
    private void BindData(string begintime, string endtime)
    {
        U_ZCTCBU zctc1 = new U_ZCTCBU();
        DataSet  ds    = zctc1.GetJZDCByDepart();

        this.Repeater1.DataSource = ds;
        this.Repeater1.DataBind();
        zctc1.Close();
    }
Esempio n. 6
0
    //处理统计事件
    void SelectTime1_StaticEvent(object sender, EventArgs e)
    {
        DateTime dt1 = default(DateTime);
        DateTime dt2 = default(DateTime);

        if (this.SelectTime1.BeginTime != "")
        {
            dt1 = DateTime.Parse(this.SelectTime1.BeginTime);
        }

        if (this.SelectTime1.EndTime != "")
        {
            dt2 = DateTime.Parse(this.SelectTime1.EndTime);
        }

        U_ZCTCBU zctc1 = new U_ZCTCBU();
        DataSet  ds    = zctc1.GetZcTJData(dt1, dt2);

        zctc1.Close();

        string tableTitle = "";

        switch (this.SelectTime1.StaticType)
        {
        case SearchStaticType.年统计:
            tableTitle = this.SelectTime1.StaticYear + "年度方案执行统计表";
            break;

        case SearchStaticType.月统计:
            tableTitle = this.SelectTime1.StaticYear + "年" + this.SelectTime1.StaticMonth + "月方案执行统计表";
            break;

        case SearchStaticType.季度统计:
            tableTitle = this.SelectTime1.StaticYear + "年" + this.SelectTime1.StaticJidu + "季度方案执行统计表";
            break;

        default:
            string begtime = this.SelectTime1.BeginTime;
            if (begtime == "")
            {
                begtime = "过去";
            }

            string endtime = this.SelectTime1.EndTime;
            if (endtime == "")
            {
                endtime = "现在";
            }
            tableTitle = begtime + "~" + endtime + "方案执行统计表";
            break;
        }
        this.SetTableData(tableTitle, ds);
    }
Esempio n. 7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            if (Request["id"] != null)
            {
                U_ZCTCBU zctc1 = new U_ZCTCBU();
                DataSet  ds1   = zctc1.GetDetailByID(Request["id"].ToString());
                this.TextBox1.Text = ds1.Tables[0].Rows[0]["remark"].ToString();

                zctc1.Close();
            }
        }
    }
Esempio n. 8
0
    //Save Data
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            Hashtable ht = new Hashtable();
            ht["kind"]    = ViewState["kind"].ToString();
            ht["zcid"]    = ViewState["parentid"].ToString();
            ht["bkind"]   = ViewState["Bkind"].ToString();
            ht["zeren"]   = User.Identity.Name;
            ht["remark"]  = this.remark.Text;
            ht["didian"]  = didian.Text;
            ht["jieguo"]  = jieguo.Text;
            ht["remark1"] = this.remark1.Text;

            U_ZCTCBU tc1 = new U_ZCTCBU();
            if (ViewState["id"] == null)
            {
                tc1.InsertData(ht);     //Add a data
            }
            else
            {
                tc1.EditTc(ViewState["id"].ToString(), ht); //Edit tc
            }
            tc1.Close();
            if (ViewState["Bkind"].ToString() == "0")
            {
                if (Int32.Parse(ViewState["kind"].ToString()) >= 20)
                {
                    Response.Redirect("ZcDetail4.aspx?id=" + ViewState["parentid"].ToString(), true);
                }
                else
                {
                    Response.Redirect("ZcDetail2.aspx?id=" + ViewState["parentid"].ToString(), true);
                }
            }
            else
            {
                if (Int32.Parse(ViewState["kind"].ToString()) >= 20)
                {
                    Response.Redirect("ZcBaoDetail4.aspx?id=" + ViewState["parentid"].ToString(), true);
                }
                else
                {
                    Response.Redirect("ZcBaoDetail2.aspx?id=" + ViewState["parentid"].ToString(), true);
                }
            }
        }
    }
Esempio n. 9
0
    protected void Repeater1_DataBound(object sender, RepeaterItemEventArgs e)
    {
        Label lab1 = e.Item.FindControl("labDepart") as Label;

        if (lab1 != null)
        {
            U_ZCTCBU zctc1 = new U_ZCTCBU();
            DataSet  ds1   = zctc1.GetJZDCFromZCTC(this.BeginTime.Text, this.EndTime.Text, lab1.Text);
            zctc1.Close();
            GridView gridview1 = e.Item.FindControl("GridView1") as GridView;
            if (gridview1 != null)
            {
                gridview1.DataSource = ds1;
                gridview1.DataBind();
            }
            gridview1.Dispose();
        }
    }
Esempio n. 10
0
 //删除(作废)数据
 protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     if (e.Item.FindControl("seldoc") != null)
     {
         string   id  = ((Label)e.Item.FindControl("seldoc")).Text;
         U_ZCTCBU tc1 = new U_ZCTCBU();
         if (e.CommandName == "delete")
         {
             tc1.DelteTC(id);
             this.BindTC(tc1);
         }
         else
         {
             tc1.EditTcForstatus(id);
             this.BindTC(tc1);
         }
         tc1.Close();
     }
 }
Esempio n. 11
0
    protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        if (e.CommandName == "deleted")
        {
            String id = e.CommandArgument.ToString();
            try
            {
                U_ZCTCBU bu1 = new U_ZCTCBU();
                bu1.DelteTC1(id);
                bu1.Close();

                Response.Redirect("EditSbb.aspx?menuIndex=6&id=" + Request["id"], true);
            }
            catch (Exception err)
            {
                Util.alert(this.Page, err.Message);
            }
        }
    }
Esempio n. 12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            if (Request["id"] != null)
            {
                U_ZCTCBU zctc1 = new U_ZCTCBU();
                DataSet  ds1   = zctc1.GetDetailByID(Request["id"].ToString());
                String   hk    = Request.QueryString["HK"];
                if (String.IsNullOrEmpty(hk))
                {
                    this.TextBox1.Text = ds1.Tables[0].Rows[0]["remark"].ToString();
                }
                else
                {
                    this.TextBox1.Text = ds1.Tables[0].Rows[0]["remark1"].ToString();
                }

                zctc1.Close();
            }
        }
    }
Esempio n. 13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            if (Context.Items["id"] != null)
            {
                U_ZCTCBU tc1 = new U_ZCTCBU();
                DataSet  ds  = tc1.GetDetailByID(Context.Items["id"].ToString());
                tc1.Close();
                if (ds.Tables[0].Rows.Count > 0)
                {
                    ViewState["id"]       = Context.Items["id"];
                    ViewState["kind"]     = ds.Tables[0].Rows[0]["kind"].ToString();
                    ViewState["parentid"] = ds.Tables[0].Rows[0]["zcid"].ToString();
                    ViewState["Bkind"]    = ds.Tables[0].Rows[0]["Bkind"].ToString();

                    Util.SetControlValue(remark, ds.Tables[0].Rows[0]["remark"]);
                    Util.SetControlValue(remark1, ds.Tables[0].Rows[0]["remark1"]);
                    Util.SetControlValue(didian, ds.Tables[0].Rows[0]["didian"]);
                    Util.SetControlValue(jieguo, ds.Tables[0].Rows[0]["jieguo"]);
                }
            }
            else
            {
                ViewState["kind"]     = Context.Items["kind"].ToString();
                ViewState["parentid"] = Context.Items["parentid"].ToString();
                ViewState["Bkind"]    = Context.Items["Bkind"].ToString();

                this.didian.Text = Page.User.Identity.Name;
                this.jieguo.Text = DateTime.Now.ToString("yyyy-MM-dd");
            }

            ////////////////////////////////////////////////////////////
            string kind = ViewState["kind"].ToString();
            switch (kind)
            {
            case "01":
                this.dckind.Text = "尽职调查-非现场调查(档案核查)";
                this.Title       = "尽职调查-非现场调查(档案核查)";
                break;

            case "02":
                this.dckind.Text = "尽职调查-现场调查(抵质押物)";
                this.Title       = "尽职调查-现场调查(抵质押物)";
                break;

            case "03":
                this.dckind.Text = "尽职调查-现场调查(保证人)";
                this.Title       = "尽职调查-现场调查(保证人)";
                break;

            case "04":
                this.dckind.Text = "尽职调查-现场调查(借款人)";
                this.Title       = "尽职调查-现场调查(借款人)";
                break;

            default:
                this.dckind.Text = "尽职调查-非现场调查(档案核查)";
                this.Title       = "尽职调查-非现场调查(档案核查)";
                break;
            }
        }
    }
Esempio n. 14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            if (Context.Items["id"] != null)
            {
                U_ZCTCBU tc1 = new U_ZCTCBU();
                DataSet  ds  = tc1.GetDetailByID(Context.Items["id"].ToString());
                tc1.Close();
                if (ds.Tables[0].Rows.Count > 0)
                {
                    ViewState["id"]       = Context.Items["id"];
                    ViewState["kind"]     = ds.Tables[0].Rows[0]["kind"].ToString();
                    ViewState["parentid"] = ds.Tables[0].Rows[0]["zcid"].ToString();
                    ViewState["Bkind"]    = ds.Tables[0].Rows[0]["Bkind"].ToString();

                    Util.SetControlValue(remark, ds.Tables[0].Rows[0]["remark"]);
                    Util.SetControlValue(didian, ds.Tables[0].Rows[0]["didian"]);
                    Util.SetControlValue(jieguo, ds.Tables[0].Rows[0]["jieguo"]);
                }
            }
            else
            {
                ViewState["kind"]     = Context.Items["kind"].ToString();
                ViewState["parentid"] = Context.Items["parentid"].ToString();
                ViewState["Bkind"]    = Context.Items["Bkind"].ToString();
            }

            ////////////////////////////////////////////////////////////
            string kind = ViewState["kind"].ToString();
            switch (kind)
            {
            case "01":
                this.dckind.Text = "尽职调查-阅卷记录";
                this.Title       = "尽职调查-阅卷记录";
                break;

            case "02":
                this.dckind.Text = "尽职调查-下户记录";
                this.Title       = "尽职调查-下户记录";
                break;

            case "03":
                this.dckind.Text = "尽职调查-取证记录";
                this.Title       = "尽职调查-取证记录";
                break;

            case "04":
                this.dckind.Text = "尽职调查-报告记录";
                this.Title       = "尽职调查-报告记录";
                break;

            case "21":
                this.dckind.Text = "方案执行-协商谈判";
                this.Title       = "方案执行-协商谈判";
                break;

            case "22":
                this.dckind.Text = "方案执行-诉讼";
                this.Title       = "方案执行-诉讼";
                break;

            case "23":
                this.dckind.Text = "方案执行-申请执行";
                this.Title       = "方案执行-申请执行";
                break;

            case "24":
                this.dckind.Text = "方案执行-强制执行";
                this.Title       = "方案执行-强制执行";
                break;

            case "25":
                this.dckind.Text = "方案执行-中止执行";
                this.Title       = "方案执行-中止执行";
                break;

            case "26":
                this.dckind.Text = "方案执行-终止执行";
                this.Title       = "方案执行-终止执行";
                break;

            case "27":
                this.dckind.Text = "方案执行-办结";
                this.Title       = "方案执行-办结";
                break;

            default:
                this.dckind.Text = "尽职调查-阅卷记录";
                this.Title       = "尽职调查-阅卷记录";
                break;
            }
        }
    }