Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DropBind();
         if (string.IsNullOrEmpty(Request.QueryString["updid"]))
         {
             Tunnel.Common.Message.Show("非法访问!", "tunnel_dutylist.aspx");
         }
         else
         {
             did = Request.QueryString["updid"].ToString();
             Tunnel.BLL.Tunnel_duty   td  = new Tunnel.BLL.Tunnel_duty();
             Tunnel.Model.Tunnel_duty tdd = new Tunnel.Model.Tunnel_duty();
             tdd           = td.GetModel(Convert.ToInt64(did));
             txtName.Text  = tdd.d_name;
             txtName2.Text = tdd.d_depict;
             Tunnel.BLL.Tunnel_bum tb = new Tunnel.BLL.Tunnel_bum();
             if (tb.GetModelList("b_id=" + tdd.d_flag + "").Count > 0)
             {
                 DropDownList1.Items.FindByValue(tdd.d_flag).Selected = true;
             }
         }
     }
 }
Example #2
0
    private void Bind()
    {
        DataSet ds = new DataSet();
        List <Tunnel.Model.Tunnel_bum> ListTbModel = new List <Tunnel.Model.Tunnel_bum>();

        Tunnel.BLL.Tunnel_bum tbBll = new Tunnel.BLL.Tunnel_bum();
        ListTbModel = tbBll.GetModelList("");
        foreach (Tunnel.Model.Tunnel_bum tbModel in ListTbModel)
        {
            if (tbModel.b_projectid != 0)
            {
                Tunnel.Data.AllProJectDataBase allData = new Tunnel.Data.AllProJectDataBase("001");//Convert.ToInt32(tbModel.b_id));
                DataTable dt = new DataTable();
                dt = allData.GetAllTableList("Violation_Menber", "1=1", "order by Vio_Date Desc");
                ds.Tables.Add(dt.Copy());
            }
        }
        PagedDataSource pds = new PagedDataSource();

        pds.DataSource  = ds.Tables[0].DefaultView;//设置数据源(DataTable类型)
        pds.AllowPaging = true;
        //每页显示的行数
        //pds.PageSize = 12;
        AspNetPager1.RecordCount = pds.Count;
        pds.CurrentPageIndex     = AspNetPager1.CurrentPageIndex - 1;
        pds.PageSize             = AspNetPager1.PageSize;
        Repeater1.DataSource     = pds;
        Repeater1.DataBind();
    }
Example #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["id"]))
            {
                did = Request.QueryString["id"].ToString();
                Tunnel.BLL.Tunnel_duty   td  = new Tunnel.BLL.Tunnel_duty();
                Tunnel.Model.Tunnel_duty tdd = new Tunnel.Model.Tunnel_duty();
                tdd         = td.GetModel(Convert.ToInt64(did));
                Label1.Text = tdd.d_name;
                Label2.Text = tdd.d_depict;

                Tunnel.BLL.Tunnel_bum          tb     = new Tunnel.BLL.Tunnel_bum();
                Tunnel.Model.Tunnel_bum        tbb    = new Tunnel.Model.Tunnel_bum();
                List <Tunnel.Model.Tunnel_bum> tbList = new List <Tunnel.Model.Tunnel_bum>();
                tbList = tb.GetModelList("b_id=" + tdd.d_flag + "");
                if (tbList.Count > 0)
                {
                    tbb         = tbList[0];
                    Label3.Text = tbb.b_name;
                }
            }
        }
    }
Example #4
0
    public void BuMenBind()
    {
        Tunnel.BLL.Tunnel_bum          bbll      = new Tunnel.BLL.Tunnel_bum();
        List <Tunnel.Model.Tunnel_bum> modelList = new List <Tunnel_bum>();

        modelList            = bbll.GetModelList("");
        Repeater2.DataSource = modelList;
        Repeater2.DataBind();
    }
Example #5
0
 public void dropBind()
 {
     blist = tb.GetModelList("1=1");
     for (int i = 0; i < blist.Count; i++)
     {
         DropDownList1.Items.Add(new ListItem(blist[i].b_name, blist[i].b_id.ToString()));
     }
     DropDownList1.Items.Insert(0, new ListItem("请选择", "0"));
 }
Example #6
0
    public string retBum(object obj)
    {
        string a = "";

        if (tb.GetModelList("b_id=" + obj.ToString() + "").Count != 0)
        {
            a = tb.GetModel(Convert.ToInt64(obj)).b_name;
        }
        return(a);
    }
Example #7
0
    public void DropBind()
    {
        Tunnel.BLL.Tunnel_bum          td     = new Tunnel.BLL.Tunnel_bum();
        List <Tunnel.Model.Tunnel_bum> tdlist = new List <Tunnel.Model.Tunnel_bum>();

        tdlist = td.GetModelList("1=1");
        for (int i = 0; i < tdlist.Count; i++)
        {
            DropDownList1.Items.Add(new ListItem(tdlist[i].b_name, tdlist[i].b_id.ToString()));
        }
        DropDownList1.Items.Insert(0, new ListItem("请选择", "0"));
    }
Example #8
0
    public void bind()
    {
        txtIdKard.Text = tmm.m_idcard;

        if (tj.GetModelList("j_id=" + tmm.m_jiao + "").Count != 0)
        {
            txtjuese.Text = tj.GetModel(Convert.ToInt64(tmm.m_jiao)).j_name;
        }
        if (tb.GetModelList("b_id=" + tmm.m_bum + "").Count != 0)
        {
            txtbumen.Text = tb.GetModel(Convert.ToInt64(tmm.m_bum)).b_name;
        }
        if (td.GetModelList("d_id=" + tmm.m_duty + "").Count != 0)
        {
            txtZhiwu.Text = td.GetModel(Convert.ToInt64(tmm.m_duty)).d_name;
        }
        if (tmm.m_xjb.ToString().Trim() != "")
        {
            List <Tunnel_xjbType> xjbList = xjbB.GetModelList(string.Format("id in ({0})", tmm.m_xjb.Replace("|", ",")));
            foreach (Tunnel.Model.Tunnel_xjbType item in xjbList)
            {
                txtXJB.Text += item.Typename + ",";
            }
            if (txtXJB.Text.Trim() != "")
            {
                txtXJB.Text = txtXJB.Text.Trim().Substring(0, txtXJB.Text.Trim().Length - 1);
            }
        }
        if (tmm.m_KSID.ToString().Trim() != "")
        {
            List <Tunnel_SelType> ksList = st.GetModelList(string.Format("KSID in ({0})", tmm.m_KSID));
            string ks = "";
            foreach (Tunnel_SelType item in ksList)
            {
                if (ks == item.KSID.ToString())
                {
                    continue;
                }
                else
                {
                    lblKS.Text += item.TypeName + ",";
                    ks          = item.KSID.ToString();
                }
            }
        }
        txtMail.Text     = tmm.m_mail;
        txtName.Text     = tmm.m_name;
        txtState.Text    = tmm.m_state == 1 ? "锁定" : "开启";
        txtTel.Text      = tmm.m_mobile;
        txtUserName.Text = tmm.m_login;
        txtBirth.Text    = tmm.m_birth.ToShortDateString() == "1800-1-1" ? "" : tmm.m_birth.ToShortDateString();
    }
Example #9
0
    ///// <summary>
    ///// 翻页
    ///// </summary>
    ///// <param name="sender"></param>
    ///// <param name="e"></param>
    //protected void MTCPager1_PageIndexChanged(object sender, EventArgs e)
    //{
    //    cuttentPage = MTCPager1.PageIndex;
    //    PageBind();
    //}

    ///// <summary>
    ///// 页面数据绑定
    ///// </summary>
    //public void PageBind()
    //{
    //    PageBase pb = new PageBase();
    //    pb.TblName = "Tunnel_menber";
    //    pb.FldName = "m_id";
    //    pb.ProcedureName = "pagination";
    //    pb.PageSize = pageSize;
    //    if (cuttentPage == 0)
    //        cuttentPage = pb.PageIndex;
    //    pb.PageIndex = cuttentPage;
    //    int count = 0;
    //    List<Tunnel.Model.Tunnel_menber> modelList = new List<Tunnel.Model.Tunnel_menber>();
    //    modelList = tbll.GetList(pb, ref count);//获取分页结果
    //    pb.DoCount = 1;
    //    tbll.GetList(pb, ref count); //获取总条数


    //    //数据绑定
    //    Repeater1.DataSource = modelList;
    //    Repeater1.DataBind();

    //    //数据分页
    //    MTCPager1.PageSize = pageSize;
    //    MTCPager1.RecordCount = count;
    //    MTCPager1.PageIndex = cuttentPage;
    //    if (count <= pb.PageSize)
    //        MTCPager1.Visible = false;
    //    else
    //        MTCPager1.Visible = true;
    //}
    #endregion

    public void BuMenBind()
    {
        Tunnel.BLL.Tunnel_bum          bbll      = new Tunnel.BLL.Tunnel_bum();
        List <Tunnel.Model.Tunnel_bum> modelList = new List <Tunnel_bum>();

        modelList = bbll.GetModelList("");
        Tunnel.Model.Tunnel_bum model = new Tunnel_bum();
        model.b_id   = 0;
        model.b_name = "未分组";
        modelList.Add(model);
        Repeater2.DataSource = modelList;
        Repeater2.DataBind();
    }
Example #10
0
 public void BindDrop()
 {
     bmmlist = bm.GetModelList("1=1");
     foreach (Tunnel.Model.Tunnel_bum item in bmmlist)
     {
         if (item.b_hid == 0)
         {
             DropDownList1.Items.Add(new ListItem("顶级机构" + "-->>" + item.b_name, item.b_id.ToString()));
         }
         else
         {
             if (bm.GetModel(item.b_id) != null)
             {
                 if (bm.GetModel(bm.GetModel(item.b_id).b_hid) != null)
                 {
                     if (item != null)
                     {
                         DropDownList1.Items.Add(new ListItem(bm.GetModel(bm.GetModel(item.b_id).b_hid).b_name + "-->>" + item.b_name, item.b_id.ToString()));
                     }
                 }
             }
         }
     }
 }
Example #11
0
    public void DropBind()
    {
        jlist = tj.GetModelList("1=1");
        for (int i = 0; i < jlist.Count; i++)
        {
            DropDownList1.Items.Add(new ListItem(jlist[i].j_name, jlist[i].j_id.ToString()));
        }
        DropDownList1.Items.Insert(0, new ListItem("请选择", "0"));

        blist = tb.GetModelList("1=1");
        for (int i = 0; i < blist.Count; i++)
        {
            ddlBum.Items.Add(new ListItem(blist[i].b_name, blist[i].b_id.ToString()));
        }
        ddlBum.Items.Insert(0, new ListItem("请选择", "0"));

        dlist = td.GetModelList("1=1");
        for (int i = 0; i < dlist.Count; i++)
        {
            ddlDuty.Items.Add(new ListItem(dlist[i].d_name, dlist[i].d_id.ToString()));
        }
        ddlDuty.Items.Insert(0, new ListItem("请选择", "0"));

        List <Tunnel.Model.Tunnel_xjbType> xjbList = m_xjbTypeBLL.GetModelList("1=1");

        foreach (Tunnel.Model.Tunnel_xjbType x_item in xjbList)
        {
            CheckBoxList3.Items.Add(new ListItem(x_item.Typename, x_item.Id.ToString()));
        }
        List <Tunnel.Model.Tunnel_SelType> newsType = st.GetModelList("KSID<>0 ORDER BY KSID");
        string sid = "";

        for (int i = 0; i < newsType.Count; i++)
        {
            if (sid == newsType[i].KSID.ToString().Trim())
            {
                continue;
            }
            else
            {
                cbListKS.Items.Add(new ListItem(newsType[i].BumName, newsType[i].KSID.ToString()));
                sid = newsType[i].KSID.ToString();
            }
        }
    }