Beispiel #1
0
        private void laodDVCapCha()
        {
            List <DM_DS> List = new List <DM_DS>();
            DM_DS        Dvi  = new DM_DS();

            Dvi.MA_DVIQLY   = Request["MADL_V"] + "";
            Dvi.NAME_DVIQLY = Request["MADL_T"] + "";
            List.Add(Dvi);

            MaDienLuc.DataSource = List;
            MaDienLuc.TextField  = "NAME_DVIQLY";
            MaDienLuc.ValueField = "MA_DVIQLY";
            MaDienLuc.DataBind();
        }
Beispiel #2
0
        private void laodDVCapCha()
        {
            MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"];
            int a = int.Parse(session.User.ma_dviqly + "");

            if (a == 2)
            {
                DM_DVQLYService dm_dviSer = new DM_DVQLYService();

                var lst_dmdv = dm_dviSer.SelectAllDM_DVQLY();

                MaDienLuc.DataSource = lst_dmdv;
                MaDienLuc.ValueField = "IDMA_DVIQLY";
                MaDienLuc.TextField  = "TEN_DVIQLY";
                MaDienLuc.DataBind();
            }
            else if (a < 38)
            {
                DM_DVQLYService dm_dviSer = new DM_DVQLYService();
                var             donvi     = dm_dviSer.SelectDM_DVQLY(int.Parse(session.User.ma_dviqly));
                List <DM_DS>    List      = new List <DM_DS>();
                DM_DS           Dvi       = new DM_DS();

                Dvi.MA_DVIQLY   = donvi.IDMA_DVIQLY + "";
                Dvi.NAME_DVIQLY = donvi.NAME_DVIQLY.Split('-')[1].ToString().ToUpper();;
                List.Add(Dvi);

                MaDienLuc.DataSource = List;
                MaDienLuc.TextField  = "NAME_DVIQLY";
                MaDienLuc.ValueField = "MA_DVIQLY";
                MaDienLuc.DataBind();
            }
            else
            {
                DM_DVQLYService dm_dviSer = new DM_DVQLYService();

                var lst_dmdv = dm_dviSer.Select_DVI_Cha_ByChild(a);

                MaDienLuc.DataSource = lst_dmdv;
                MaDienLuc.ValueField = "IDMA_DVIQLY";
                MaDienLuc.TextField  = "TEN_DVIQLY";
                MaDienLuc.DataBind();
            }
        }