private void LoadDataDV() { MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int a = int.Parse(session.User.ma_dviqly + ""); if (MaDienLuc.Value + "" != "") { if (a > 38) { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); var donvi = dm_dviSer.SelectDM_DVQLY(a); List <DM_DS> List = new List <DM_DS>(); DM_DS Dvi = new DM_DS(); Dvi.MA_DVIQLY = session.User.ma_dviqlyDN + ""; Dvi.NAME_DVIQLY = donvi.NAME_DVIQLY.Split('-')[1].ToString().ToUpper(); List.Add(Dvi); cmMaDvi.DataSource = List; cmMaDvi.TextField = "NAME_DVIQLY"; cmMaDvi.ValueField = "MA_DVIQLY"; cmMaDvi.DataBind(); } else { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); // DataTable lst_dmdv = new DataTable(); var lst_dmdv = dm_dviSer.SelectAll_DVI_ByChild(int.Parse(MaDienLuc.Value + "")); cmMaDvi.DataSource = lst_dmdv; cmMaDvi.ValueField = "MA_DVIQLY"; cmMaDvi.TextField = "NAME_DVIQLY"; cmMaDvi.DataBind(); } } }
private void loadDanhMuc() { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); DataTable lst_dmdv = new DataTable(); MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int ma_dviqly = int.Parse(session.User.ma_dviqly + ""); var donvi = dm_dviSer.SelectDM_DVQLY(ma_dviqly); if (donvi.ParentId == 0 || donvi.ParentId == 61) { lst_dmdv = dm_dviSer.SelectAll_DVI_ByChild(ma_dviqly); cmbMaDonVi.DataSource = lst_dmdv; cmbMaDonVi.ValueField = "IDMA_DVIQLY"; cmbMaDonVi.TextField = "NAME_DVIQLY"; cmbMaDonVi.DataBind(); } else { List <Entity.DM_DVQLY> lst = new List <DM_DVQLY>(); lst.Add(donvi); cmbMaDonVi.DataSource = lst; cmbMaDonVi.ValueField = "IDMA_DVIQLY"; cmbMaDonVi.TextField = "NAME_DVIQLY"; cmbMaDonVi.DataBind(); } }
private void LoadDataDV() { if (cmbCapCha.SelectedValue + "" != "") { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); // DataTable lst_dmdv = new DataTable(); var lst_dmdv = dm_dviSer.SelectAll_DVI_ByChild(int.Parse(cmbCapCha.SelectedValue + "")); cmbDVChuQuan.DataSource = lst_dmdv; cmbDVChuQuan.DataValueField = "IDMA_DVIQLY"; cmbDVChuQuan.DataTextField = "NAME_DVIQLY"; cmbDVChuQuan.DataBind(); } }
private void loadDanhMuc() { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int ma_dviqly = int.Parse(session.User.ma_dviqly + ""); var lst_dmdv = dm_dviSer.SelectAll_DVI_ByChild(ma_dviqly); cmbCuoiNguon.DataSource = lst_dmdv; cmbCuoiNguon.ValueField = "IDMA_DVIQLY"; cmbCuoiNguon.TextField = "TEN_DVIQLY"; cmbCuoiNguon.DataBind(); }
private void LoadCMBChooseParent(int ParentId) { //cmbChoseParent.DataSource = TreeListOrganization.DataSource; //cmbChoseParent.ValueField = "IDMA_DVIQLY"; //cmbChoseParent.TextField = "NAME_DVIQLY"; //cmbChoseParent.DataBind(); MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; DM_DVQLYService dm_dviSer = new DM_DVQLYService(); //List<DM_DVQLY> lst_dmdv = new List<DM_DVQLY>(); var lst_dmdv = dm_dviSer.SelectAll_DVI_ByChild(int.Parse(session.User.MA_DVIQLY)); cmbChoseParent.DataSource = lst_dmdv; cmbChoseParent.ValueField = "IDMA_DVIQLY"; cmbChoseParent.TextField = "NAME_DVIQLY"; cmbChoseParent.DataBind(); //if (ParentId == 0) // cmbChoseParent.SelectedIndex = IndexOf(int.Parse(TreeListOrganization.FocusedNode.Key), // (List<Entity.DM_DVQLY>)TreeListOrganization.DataSource); //else // cmbChoseParent.SelectedIndex = IndexOf(ParentId, (List<Entity.DM_DVQLY>)TreeListOrganization.DataSource); }