예제 #1
0
    private void BindData(U_ZCFilesBU file1)
    {
        bool flag = false;

        if (file1 == null)
        {
            file1 = new U_ZCFilesBU();
            flag  = true;
        }
        DataSet ds1 = file1.GetAttachListByBID(Request["id"].ToString());

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

        string    id  = Request["id"];
        U_ZCBAOBU zc1 = new U_ZCBAOBU();
        DataSet   ds  = zc1.GetDetailByID(id, "depart,bzeren,bname");

        zc1.Close();
        if (ds.Tables[0].Rows.Count > 0)
        {
            this.Bname.Text  = ds.Tables[0].Rows[0]["bname"].ToString();
            this.depart.Text = ds.Tables[0].Rows[0]["depart"].ToString();
            this.zeren.Text  = ds.Tables[0].Rows[0]["bzeren"].ToString();
        }
        if (flag)
        {
            file1.Close();
        }
    }
예제 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            Comm.SetDepart(this.depart, "所有部门");

            /////////////////////////////////////
            ;
            this.depart.SelectedValue = "";
            ///////////////////////////////////////
            U_ItemBU item1 = new U_ItemBU();;

            item1.ItemName = "行政区域";
            item1.SetLiteralControl(this.quyu, "全部...");

            item1.ItemName = "行业分类";
            item1.SetLiteralControl(this.hangye, "全部...");

            item1.SetStatus(this.jzdc, "尽职调查");

            item1.SetStatus(this.fasp, "方案审批");

            item1.SetStatus(this.fazx, "方案执行");

            item1.Close();

            U_ZCBAOBU zcb1 = new U_ZCBAOBU();
            zcb1.SetBstatus(this.Bstatus, "全部...");
            zcb1.Close();
            ////////////////////////////////////////////

            depart_SelectedIndexChanged(this.depart, e);
        }
    }
예제 #3
0
    //资产包详细信息
    private void BindZcInfo()
    {
        U_ZCBAOBU zcb1 = new U_ZCBAOBU();
        string    ids  = zcb1.GetZCIDByBID(Request["ID"].ToString());
        U_ZCBU    zc1  = new U_ZCBU();
        DataSet   ds1  = zc1.GetZCInfoByID(ids);

        this.Repeater1.DataSource = ds1;
        this.Repeater1.DataBind();
        zcb1.Close();

        //统计总和
        for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
        {
            DataRow dr = ds1.Tables[0].Rows[i];
            if (dr["bj"] != DBNull.Value)
            {
                this.sum1 = this.sum1 + double.Parse(dr["bj"].ToString());
            }
            if (dr["lxhj"] != DBNull.Value)
            {
                this.sum2 = this.sum2 + double.Parse(dr["lxhj"].ToString());
            }
        }
    }
예제 #4
0
    private void BindData(string Bname)
    {
        U_ZCBAOBU zcb1 = new U_ZCBAOBU();
        DataSet   ds1  = zcb1.GetZCBAOInfo(Bname);

        this.GridView1.DataSource = ds1;
        this.GridView1.DataBind();
        zcb1.Close();
        ds1.Dispose();
    }
예제 #5
0
 protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     if (e.CommandName == "delete")
     {
         U_ZCBAOBU zcb1 = new U_ZCBAOBU();
         zcb1.DelZCFromZcBao(e.CommandArgument.ToString());
         zcb1.Close();
         this.Bind();
     }
 }
예제 #6
0
    private void BindData(string Bname)
    {
        U_ZCBAOBU zcb1 = new U_ZCBAOBU();
        DataSet   ds1  = zcb1.GetZcBaoSearchResult2(Bname, this.GetMyDepartMen());

        this.GridView1.DataSource = ds1;
        this.GridView1.DataBind();
        zcb1.Close();
        ds1.Dispose();
    }
예제 #7
0
    //绑定数据
    private void BindData(string bname)
    {
        U_ZCBAOBU zc1 = new U_ZCBAOBU();
        DataSet   ds1 = zc1.GetMyShenPiZcB(User.Identity.Name, bname, 1);

        this.GridView1.DataSource = ds1;
        this.GridView1.DataBind();
        zc1.Close();
        ds1.Dispose();
    }
예제 #8
0
    private void BindData(string Bname)
    {
        U_ZCBAOBU zcb1 = new U_ZCBAOBU();
        DataSet   ds1  = zcb1.GetZcBaoSearchResult2(Bname, User.Identity.Name);

        this.GridView1.DataSource = ds1;
        this.GridView1.DataBind();
        zcb1.Close();
        ds1.Dispose();
    }
예제 #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            PubComm.SetDepart(this.depart, "所有部门");
            PubComm.SetZCStatus(this.status, "所有状态");


            /////////////////////////////////////

            this.depart.SelectedValue = "";
            this.zcbao.SelectedValue  = "";
            ///////////////////////////////////////
            U_ItemBU item1 = new U_ItemBU();
            item1.ItemName = "政策包";
            item1.SetLiteralControl(this.zcbao, "全部...");
            this.zcbao.SelectedValue = "";

            item1.ItemName = "行政区域";
            item1.SetLiteralControl(this.quyu, "全部...");

            item1.ItemName = "行业分类";
            item1.SetLiteralControl(this.hangye, "全部...");

            item1.ItemName = "资产性质分类";
            item1.SetLiteralControl(this.fenlei, "全部...");


            item1.Close();

            U_ZCBAOBU zcb1 = new U_ZCBAOBU();
            zcb1.SetBstatus(this.Bstatus, "全部...");
            zcb1.Close();
            ////////////////////////////////////////////

            depart_SelectedIndexChanged(this.depart, e);

            U_ItemBU item = new U_ItemBU();
            item.Setuserkind(this.userkind);
            item.Close();


            //调整执行状态的选择 (====2013年新增=====)
            PubComm.SetProfile("方案执行结果", this.spresult, "");
            PubComm.SetProfile("方案执行状态大类", this.status1, "全部...");

            //this.status1.Items.Add(new ListItem("全部...", ""));
            this.status2.Items.Add(new ListItem("全部...", ""));
        }

        this.danwei.Attributes.Add("onkeydown", "javascript:if( event.keyCode == 13 ) { " + this.Button1.ClientID + ".click(); return false; } ");
        this.num1.Attributes.Add("onkeydown", "javascript:if( event.keyCode == 13 ) { " + this.Button1.ClientID + ".click(); return false; } ");
        this.num2.Attributes.Add("onkeydown", "javascript:if( event.keyCode == 13 ) { " + this.Button1.ClientID + ".click(); return false; } ");
    }
예제 #10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         U_ZCBAOBU zcb1 = new U_ZCBAOBU();
         zcb1.SetBstatus(this.Bstatus, "");
         zcb1.Close();
         if (this.Bstatus.Items.Count > 0)
         {
             this.Bstatus.SelectedIndex = 0;
         }
     }
 }
예제 #11
0
    private void BindDate()
    {
        List <SearchField> list1 = new List <SearchField>();

        list1.Add(new SearchField("id", ViewState["bid"].ToString(), SearchOperator.集合, SearchFieldType.数值型));
        U_ZCBAOBU zcb1 = new U_ZCBAOBU();
        DataSet   ds   = zcb1.GetDetail(list1, "*");

        zcb1.Close();
        this.GridView1.DataSource = ds;
        this.GridView1.DataBind();
        ds.Dispose();
    }
예제 #12
0
    //判断某用户对某资产包是否有维护的权限
    public static bool IsZcBaoMng(string bid, string username)
    {
        bool      result = false;
        U_ZCBAOBU zcb1   = new U_ZCBAOBU();
        DataSet   ds1    = zcb1.GetDetailByID(bid, "bzeren");

        if (ds1.Tables[0].Rows.Count > 0)
        {
            if (ds1.Tables[0].Rows[0][0].ToString() == username)
            {
                result = true;
            }
        }
        zcb1.Close();
        return(result);
    }
예제 #13
0
    private void BindData()
    {
        U_ZCBAOBU zcb1 = new U_ZCBAOBU();
        string    ids  = zcb1.GetZCIDByBID(Request["id"].ToString());

        zcb1.Close();
        List <SearchField> list1 = new List <SearchField>();

        list1.Add(new SearchField("id", ids, SearchOperator.集合, SearchFieldType.数值型));
        list1.Add(new SearchField("zeren", User.Identity.Name, SearchFieldType.字符型));
        U_ZCBU  zc1 = new U_ZCBU();
        DataSet ds  = zc1.GetSearchResult(list1);

        this.GridView1.DataSource = ds;
        this.GridView1.DataBind();
        ds.Dispose();
        zc1.Close();
    }
예제 #14
0
    private void BindData()
    {
        if (Request["id"] != null)
        {
            string    id   = Request["id"];
            U_ZCBAOBU zcb1 = new U_ZCBAOBU();
            DataSet   ds   = zcb1.GetDetailByID(id, "id,depart,bzeren,bstatus,statusText,bname,bljsk,bljzc");

            this.Bname.Text      = ds.Tables[0].Rows[0]["bname"].ToString();
            this.Bid.Text        = ds.Tables[0].Rows[0]["id"].ToString();
            this.depart.Text     = ds.Tables[0].Rows[0]["depart"].ToString();
            this.bzeren.Text     = ds.Tables[0].Rows[0]["bzeren"].ToString();
            this.status.Text     = ds.Tables[0].Rows[0]["bstatus"].ToString();
            this.statusText.Text = ds.Tables[0].Rows[0]["statusText"].ToString();
            this.ljsk.Text       = ds.Tables[0].Rows[0]["bljsk"].ToString();
            this.ljzc.Text       = ds.Tables[0].Rows[0]["bljzc"].ToString();

            if (this.statusText.Text == "")
            {
                this.statusText.Text = "阅卷";
            }
            ds.Dispose();

            Hashtable ht = zcb1.GetZcBbjANDlx(this.Bid.Text);
            this.bbjhj.Text = ht["bbjhj"].ToString();
            this.blxhj.Text = ht["blxhj"].ToString();
            zcb1.Close();
            //设置数字金额的显示
            string[] num1 = new string[] { "bbjhj", "blxhj", "ljzc", "ljsk" };
            for (int i = 0; i < num1.Length; i++)
            {
                Label l1 = this.bbjhj.Parent.FindControl(num1[i]) as Label;
                if (l1 != null)
                {
                    l1.Text = Comm.GetNumberFormat(l1.Text);
                }
            }

            ds.Dispose();
        }
    }
예제 #15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            this.billtime.Text = DateTime.Now.ToString("yyyy-M-d");
            this.billmen.Text  = User.Identity.Name;
            U_ZCBAOBU zcb1 = new U_ZCBAOBU();
            DataSet   ds   = zcb1.GetDetailByID(Request["bid"].ToString(), "Bname,Bzeren");
            zcb1.Close();
            if (ds.Tables[0].Rows.Count > 0)
            {
                Util.SetControlValue(bname, ds.Tables[0].Rows[0]["Bname"]);
                Util.SetControlValue(bzeren, ds.Tables[0].Rows[0]["Bzeren"]);

                CW_ShouKuan1BU sk1 = new CW_ShouKuan1BU();
                this.bill.Text = sk1.GetBillNum();
                sk1.Close();
            }
            this.billtime.Attributes["onfocus"] = "setday(this)";
        }
    }
예제 #16
0
    private void Bind()
    {
        if (Request["ID"] != null)
        {
            U_ZCBAOBU zcb1 = new U_ZCBAOBU();
            DataSet   ds   = zcb1.GetZCBAOInfoByID(Request["ID"].ToString());
            this.Bname.Text   = ds.Tables[0].Rows[0]["Bname"].ToString();
            this.Bjsf.Text    = ds.Tables[0].Rows[0]["Bjsf"].ToString();
            this.Bzeren.Text  = ds.Tables[0].Rows[0]["Bzeren"].ToString();
            this.Bzeren1.Text = ds.Tables[0].Rows[0]["bzeren1"].ToString();

            this.Bremark.Text  = ds.Tables[0].Rows[0]["Bremark"].ToString();
            ViewState["Bname"] = ds.Tables[0].Rows[0]["Bname"].ToString();
            string  ids = zcb1.GetZCIDByBID(Request["ID"].ToString());
            U_ZCBU  zc1 = new U_ZCBU();
            DataSet ds1 = zc1.GetZCInfoByID(ids);
            this.Repeater1.DataSource = ds1;
            this.Repeater1.DataBind();
            zcb1.Close();
        }
    }
예제 #17
0
    //绑定资产调查数据
    private void BindData()
    {
        if (Request["id"] != null)
        {
            string    id   = Request["id"];
            U_ZCBAOBU zcb1 = new U_ZCBAOBU();
            DataSet   ds   = zcb1.GetDetailByID(id, "id,depart,bzeren,bstatus,statusText,bname");
            zcb1.Close();

            this.Bname.Text      = ds.Tables[0].Rows[0]["bname"].ToString();
            this.Bid.Text        = ds.Tables[0].Rows[0]["id"].ToString();
            this.depart.Text     = ds.Tables[0].Rows[0]["depart"].ToString();
            this.bzeren.Text     = ds.Tables[0].Rows[0]["bzeren"].ToString();
            this.status.Text     = ds.Tables[0].Rows[0]["bstatus"].ToString();
            this.statusText.Text = ds.Tables[0].Rows[0]["statusText"].ToString();
            if (this.statusText.Text == "")
            {
                this.statusText.Text = "阅卷";
            }
            ds.Dispose();
            this.SetButton();
        }
    }
예제 #18
0
    private void SetPageData()
    {
        if (Request["id"] != null)
        {
            string    id   = Request["id"];
            U_ZCBAOBU zcb1 = new U_ZCBAOBU();
            DataSet   ds   = zcb1.GetZCBAOInfoByID(id);
            zcb1.Close();

            //设置控件的值
            bool   owner = false;
            string user1 = "";
            if (ds.Tables[0].Rows[0]["bzeren"] != DBNull.Value)
            {
                user1 = ds.Tables[0].Rows[0]["bzeren"].ToString();
            }

            if (user1 == User.Identity.Name || (user1.Trim() == "" && Comm.IsRole("系统管理员")))
            {
                owner = true;
            }
            else
            {
                this.Button1.Visible = false;
            }

            //设置控件数据的显示
            for (int i = 1; i < ds.Tables[0].Columns.Count; i++)
            {
                string colName = ds.Tables[0].Columns[i].ColumnName.ToLower();
                if (owner)
                {
                    if (this.Bname.Parent.FindControl(colName) != null)
                    {
                        Util.SetControlValue(this.Bname.Parent.FindControl(colName), ds.Tables[0].Rows[0][colName]);
                    }
                    if (this.Bname.Parent.FindControl(colName + "_1") != null)
                    {
                        this.Bname.Parent.FindControl(colName + "_1").Visible = false;;
                    }
                }
                else
                {
                    if (this.Bname.Parent.FindControl(colName + "_1") != null)
                    {
                        Util.SetControlValue(this.Bname.Parent.FindControl(colName + "_1"), ds.Tables[0].Rows[0][colName]);
                    }
                    if (this.Bname.Parent.FindControl(colName) != null)
                    {
                        this.Bname.Parent.FindControl(colName).Visible = false;;
                    }
                }
            }

            //设置数字金额的显示
            string[] num1 = new string[] { "Bljsk", "Bljzc" };
            for (int i = 0; i < num1.Length; i++)
            {
                TextBox t1 = this.Bljsk.Parent.FindControl(num1[i]) as TextBox;
                Label   l1 = this.Bljsk.Parent.FindControl(num1[i] + "_1") as Label;
                if (t1 != null)
                {
                    t1.Text = Comm.GetNumberFormat(t1.Text);
                }
                if (l1 != null)
                {
                    l1.Text = Comm.GetNumberFormat(l1.Text);
                }
            }
        }
    }