Exemple #1
0
 public void BindBLL_Organ(DropDownList ddl)
 {
     DataTable dt = new OrganBLL().GetAllList().Tables[0];
     ddl.DataSource = dt;
     ddl.DataValueField = "OrganID";
     ddl.DataTextField = "OrganName";
 }
Exemple #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, "删除失败!");
            }
        }
    }
Exemple #3
0
        public void BindBLL_Organ(DropDownList ddl)
        {
            DataTable dt = new OrganBLL().GetAllList().Tables[0];

            ddl.DataSource     = dt;
            ddl.DataValueField = "OrganID";
            ddl.DataTextField  = "OrganName";
        }
Exemple #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();
 }
Exemple #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();
    }
Exemple #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();
 }