예제 #1
0
 public void BindBLL_Organ(DropDownList ddl)
 {
     DataTable dt = new OrganBLL().GetAllList().Tables[0];
     ddl.DataSource = dt;
     ddl.DataValueField = "OrganID";
     ddl.DataTextField = "OrganName";
 }
예제 #2
0
    protected void btn_Delete_Click(object sender, ImageClickEventArgs e)
    {
        string idList = string.Empty;
        foreach (GridViewRow dr in GridView1.Rows)
        {
            CheckBox chk = (CheckBox)dr.FindControl("chk");
            if (chk.Checked)
            {
                int _id = Convert.ToInt32((dr.Cells[1].Text));
                idList += _id + ",";
            }

        }
        if (idList.Length > 0)
        {
            if (idList.Contains("1000"))
            {
                UtilityService.Alert(this.Page, "不能删除总公司信息!");
                return;
            }
            OrganBLL organBLL = new OrganBLL();
            idList = idList.TrimEnd(',');
            bool re = organBLL.DeleteList(idList);
            if (re)
            {
                UtilityService.AlertAndRedirect(this.Page, "删除成功!", "OrganMgr.aspx");
            }
            else
            {
                UtilityService.Alert(this.Page, "删除失败!");
            }
        }
    }
예제 #3
0
파일: CommonBLL.cs 프로젝트: xiaodin1/lzQA
        public void BindBLL_Organ(DropDownList ddl)
        {
            DataTable dt = new OrganBLL().GetAllList().Tables[0];

            ddl.DataSource     = dt;
            ddl.DataValueField = "OrganID";
            ddl.DataTextField  = "OrganName";
        }
예제 #4
0
 private void BindOrgan()
 {
     DataSet ds = new OrganBLL().GetAllList();
     ddl_Organ.DataSource = ds.Tables[0];
     ddl_Organ.DataTextField = "OrganName";
     ddl_Organ.DataValueField = "OrganID";
     ddl_Organ.DataBind();
 }
예제 #5
0
    private void BindOrgan()
    {
        IList<Organ> ds = new OrganBLL().GetModelList("");
        Organ o = new Organ();
        o.OrganID = 100;
        o.OrganName = "超级管理员";
        ds.Add(o);

        //ddl_Superior.DataSource = ds;
        //ddl_Superior.DataTextField = "OrganName";
        //ddl_Superior.DataValueField = "OrganID";
        //ddl_Superior.DataBind();
    }
예제 #6
0
 private void BindGV()
 {
     OrganBLL organBLL = new OrganBLL();
     IList<Organ> ds = organBLL.GetModelList("");
     foreach (Organ o in ds)
     {
         Organ oa = organBLL.GetModel(o.Superior);
         if (oa == null)
             o.SuperiorName = "无";
         else
             o.SuperiorName = oa.OrganName;
     }
     GridView1.DataSource = ds;
     GridView1.DataBind();
 }