public void GetGridGeneralSetting_Lang2Test() { busGridSettings = new BGridMonthlyOperationClientSettings(ADOUser2.UserName); MonthlyOperationGridClientGeneralSettings gridSet = busGridSettings.GetMonthlyOperationGridGeneralClientSettings(); Assert.AreEqual(ADOLAnguage2.ID, gridSet.Language.ID); }
public void GetGridGeneralSetting_Lang1Test() { try { busGridSettings = new BGridMonthlyOperationClientSettings(ADOUser1.UserName); MonthlyOperationGridClientGeneralSettings gridSet = busGridSettings.GetMonthlyOperationGridGeneralClientSettings(); Assert.AreEqual(ADOLAnguage1.ID, gridSet.Language.ID); } catch (Exception ex) { Assert.Fail(ex.Message); } }
private void SetGridColumnsSize_MasterMonthlyOperation(ComponentArt.Web.UI.Grid grid) { MonthlyOperationGridClientGeneralSettings monthlyOperationGridClientGeneralSettings = this.MonthlyOperationGridClientSettingsBusiness.GetMonthlyOperationGridGeneralClientSettings(); GridColumnCollection Gcc = grid.Levels[0].Columns; for (int i = 1; i < Gcc.Count; i++) { PropertyInfo PInfo = typeof(MonthlyOperationGridClientGeneralSettings).GetProperty(Gcc[i].DataField); if (PInfo != null) { Gcc[i].Width = (int)PInfo.GetValue(monthlyOperationGridClientGeneralSettings, null); } } }
private void SetHeaderColumnsSize_MasterMonthlyOperation(Table table) { MonthlyOperationGridClientGeneralSettings monthlyOperationGridClientGeneralSettings = this.MonthlyOperationGridClientSettingsBusiness.GetMonthlyOperationGridGeneralClientSettings(); TableCellCollection gcc = table.Rows[0].Cells; for (int i = 1; i < gcc.Count; i++) { if (gcc[i].ID != null) { PropertyInfo PInfo = typeof(MonthlyOperationGridClientGeneralSettings).GetProperty(gcc[i].ID); if (PInfo != null) { gcc[i].Width = (int)PInfo.GetValue(monthlyOperationGridClientGeneralSettings, null); } } } }
protected void Button42_Click(object sender, EventArgs e) { #region SetGridColumnsSize_MasterMonthlyOperation BGridMonthlyOperationClientSettings MonthlyOperationGridClientSettingsBusiness = new BGridMonthlyOperationClientSettings(); MonthlyOperationGridClientGeneralSettings monthlyOperationGridClientGeneralSettings = MonthlyOperationGridClientSettingsBusiness.GetMonthlyOperationGridGeneralClientSettings(); #endregion #region SetVisibleColumns_MasterMonthlyOperation MonthlyOperationGridClientSettings monthlyOperationGridClientSettings = MonthlyOperationGridClientSettingsBusiness.GetMonthlyOperationGridClientSettings(); #endregion #region SetReserveFieldsHeaderColumnsCaption_MasterMonthlyOperation BPersonMonthlyWorkedTime MonthlyOperationBusiness = new BPersonMonthlyWorkedTime(0); IDictionary <ConceptReservedFields, string> dic = MonthlyOperationBusiness.GetReservedFieldsNames(); /*foreach (string conceptReservedFieldName in Enum.GetNames(typeof(ConceptReservedFields))) * { * string HeadingText = MonthlyOperationBusiness.GetReservedFieldsName((ConceptReservedFields)Enum.Parse(typeof(ConceptReservedFields), conceptReservedFieldName)); * }*/ #endregion #region Fill_GridMasterMonthlyOperation_MasterMonthlyOperation IList <PersonalMonthlyReportRow> PersonnelMonthlyOperationList = null; PersonalMonthlyReportRow PersonnelSummaryMonthlyOperation = null; try { decimal PersonnelID = BUser.CurrentUser.Person.ID; BPersonMonthlyWorkedTime MonthlyOperationBusiness1 = new BPersonMonthlyWorkedTime(PersonnelID); MonthlyOperationBusiness.GetPersonMonthlyReport(1391, 12, "1391/12/01", "1391/12/29", out PersonnelMonthlyOperationList, out PersonnelSummaryMonthlyOperation); Dictionary <string, object> MonthlyOperationSourceDic = new Dictionary <string, object>(); MonthlyOperationSourceDic.Add("Details", PersonnelMonthlyOperationList); MonthlyOperationSourceDic.Add("Summary", PersonnelSummaryMonthlyOperation); } catch { } #endregion }