public void Retrieve(bool is4portal, List <U8User> users, string currentViewId) { DataSet ds = null; int defaultPublishSettingBeginIndex = 4; if (is4portal) { defaultPublishSettingBeginIndex = 1; ds = this.RetrieveData4Portal(); } else { ds = this.RetrieveData(currentViewId); } // 获取默认设置 DataTable[] dts = new DataTable[] { ds.Tables[defaultPublishSettingBeginIndex], ds.Tables[defaultPublishSettingBeginIndex + 1], ds.Tables[defaultPublishSettingBeginIndex + 2], ds.Tables[defaultPublishSettingBeginIndex + 3], }; this.Target = new PublishData(null); this.Target.LogInfo = this.LogInfo; this.Target.RetrieveFrom(dts); //this.Target.EmailTitle = null; //this.Target.EmailContext = null; this.Target.Name = null;//置为空,让ReportPublishFacade.InitTargetNew生成默认名称 PublishDataService.FillPublishUserInfo(users, ds.Tables[defaultPublishSettingBeginIndex + 4]); }
public static void FillPublishUserInfo(List <U8User> users, DataTable dt) { users.Clear(); foreach (DataRow dr in dt.Rows) { users.Add(PublishDataService.GetU8user(dr)); } }
public List <U8User> GetPublishUserInfo(string reportID) { string sql = string.Format( @"EXECUTE uap_reportview_getusersbyreport '{0}','{1}','{2}'", reportID, this.LogInfo.cAccId, this.LogInfo.cYear); DataSet ds = SqlHelper.ExecuteDataSet(this._loginInfo.UfMetaCnnString, sql); List <U8User> users = new List <U8User>(); PublishDataService.FillPublishUserInfo(users, ds.Tables[0]); return(users); }
private void FillReceivers(DataTable table, PublishData pd) { pd.Receivers.Clear(); foreach (DataRow dr in table.Rows) { U8User user = PublishDataService.GetU8user(dr); pd.Receivers.Add(user); //判断当前操作员是否拒绝接受该发布 if (user.ID == this._loginInfo.UserID) { pd.bRefused = SqlHelper.GetBooleanFrom(dr["bRefused"], false); } } }