void LoadData() { try { c_lst = c_Estate_Object_Controller.Estate_Object_GetAll(); dgrEstate.ItemsSource = c_lst; DataGridHelper.NVSFocus(dgrEstate, 0, 0); } catch (Exception ex) { CommonData.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()); } }