public static Hashtable c_hash_User = new Hashtable(); //luu UserInfo, key: Id /// <summary> /// load tham số hệ thống /// </summary> public static void LoadParamSystem() { try { #region User lock (c_hash_User.SyncRoot) { User_Controller _User_Controller = new User_Controller(); c_hash_User.Clear(); List <User_Info> _lst_us = _User_Controller.User_Get_All(); if (_lst_us.Count > 0) { foreach (User_Info item in _lst_us) { c_hash_User[item.User_Id] = item; } } } #endregion } catch (Exception ex) { CommonData.log.Error(ex.ToString()); } }
void loadCombobox() { try { User_Controller _UserControler = new User_Controller(); List <User_Info> _arr = _UserControler.User_Get_All(); User_Info _objshort = new User_Info(); _objshort.User_Id = -1; _objshort.User_Name = CommonData.c_All_Content; _arr.Insert(0, _objshort); cboNguoidung.ItemsSource = _arr; cboNguoidung.DisplayMemberPath = "User_name"; cboNguoidung.SelectedValuePath = "User_id"; cboNguoidung.SelectedIndex = 0; //Add tinh thong tin vao Combobox! ArrayList _arrTable = new ArrayList(); TableInfo _TableInfo1 = new TableInfo(); _TableInfo1.ID = 1; _TableInfo1.Name = "CONTRACT"; _arrTable.Add(_TableInfo1); TableInfo _TableInfo7 = new TableInfo(); _TableInfo7.ID = 1; _TableInfo7.Name = "CUSTOMER"; _arrTable.Add(_TableInfo7); TableInfo _TableInfo0 = new TableInfo(); _TableInfo0.ID = -1; _TableInfo0.Name = CommonData.c_All_Content; _arrTable.Insert(0, _TableInfo0); cboTenbang.ItemsSource = _arrTable; cboTenbang.SelectedValuePath = "ID"; cboTenbang.DisplayMemberPath = "Name"; cboTenbang.SelectedIndex = 0; List <int> lstTotalRow = new List <int>() { 10, 20, 50, 100, 200 }; cboTotalRow.ItemsSource = lstTotalRow; cboTotalRow.SelectedIndex = 0; CommonData.RowTotalDock = int.Parse(cboTotalRow.SelectedValue.ToString()); } catch (Exception ex) { ErrorLog.log.Error(ex.ToString()); } }
void LoadData() { try { c_lst = c_User_Controller.User_Get_All(); dgrUser.ItemsSource = c_lst; DataGridHelper.NVSFocus(dgrUser, 0, 0); } catch (Exception ex) { CommonData.log.Error(ex.ToString()); } }
static void LoadUsers() { try { lock (c_hash_User.SyncRoot) { c_ar_Users.Clear(); User_Controller _usercontrol = new User_Controller(); c_ar_Users = _usercontrol.User_Get_All(); c_hash_Users.Clear(); foreach (User_Info item in c_ar_Users) { c_hash_Users[item.User_Id] = item; } } } catch (Exception ex) { ErrorLog.log.Error(ex.ToString()); } }
void LoadCombobox() { try { AllCode_Info _AllCode_Info = new AllCode_Info(); _AllCode_Info.Content = CommonData.c_All_Content; _AllCode_Info.CdValue = CommonData.c_All_Value; Estate_Object_Controller _Estate_Object_Controller = new Estate_Object_Controller(); List <Estate_Object_Info> _lst_eb = _Estate_Object_Controller.Estate_Object_GetAll(); Estate_Object_Info _Estate_Object_Info = new Estate_Object_Info(); _Estate_Object_Info.Estate_Code = CommonData.c_All_Value; _Estate_Object_Info.Estate_Name = CommonData.c_All_Value; _lst_eb.Insert(0, _Estate_Object_Info); cboEsateCode.ItemsSource = _lst_eb; cboEsateCode.DisplayMemberPath = "Estate_Name"; cboEsateCode.SelectedValuePath = "Estate_Code"; cboEsateCode.SelectedIndex = 0; User_Controller c_User_Controller = new User_Controller(); List <User_Info> _lst_us = c_User_Controller.User_Get_All(); User_Info _User_Info = new User_Info(); _User_Info.User_Name = CommonData.c_All_Value; _User_Info.User_Name = CommonData.c_All_Value; _lst_us.Insert(0, _User_Info); cboCreatedBy.ItemsSource = _lst_us; cboCreatedBy.DisplayMemberPath = "User_Name"; cboCreatedBy.SelectedValuePath = "User_Name"; cboCreatedBy.SelectedIndex = 0; } catch (Exception ex) { CommonData.log.Error(ex.ToString()); } }
private void Window_Loaded(object sender, RoutedEventArgs e) { c_lst = c_User_Controller.User_Get_All(); LoadData(); }