示例#1
0
        public static List <Caution> CreateCautions(string userCode)
        {
            List <Caution> first   = new List <Caution>();
            PopupSetting   setting = new PopupSetting();
            EnumerableRowCollection <string> source = setting.GetSetting(userCode).AsEnumerable().Select <DataRow, string>(m => m.Field <string>("Module"));

            if (source.Contains <string>(PopupParam.Bulletin))
            {
                first = first.Union <Caution>(CreateBulletions(userCode)).ToList <Caution>();
            }
            if (source.Contains <string>(PopupParam.CompanyNews))
            {
                first = first.Union <Caution>(CreateCompanyNews(userCode)).ToList <Caution>();
            }
            if (source.Contains <string>(PopupParam.Workflow))
            {
                first = first.Union <Caution>(CreateWorkflow(userCode)).ToList <Caution>();
            }
            if (source.Contains <string>(PopupParam.Schedule))
            {
                first = first.Union <Caution>(CreateSchedule(userCode)).ToList <Caution>();
            }
            if (source.Contains <string>(PopupParam.Mail))
            {
                first = first.Union <Caution>(CreateMail(userCode)).ToList <Caution>();
            }
            if (source.Contains <string>(PopupParam.Warning))
            {
                first = first.Union <Caution>(CreateWaring(userCode)).ToList <Caution>();
            }
            return(first);
        }
示例#2
0
    private void DataBindChk()
    {
        PopupSetting setting = new PopupSetting();
        EnumerableRowCollection <string> source = setting.GetSetting(base.UserCode).AsEnumerable().Where <DataRow>(m => m.Field <bool>("IsValid")).Select <DataRow, string>(m => m.Field <string>("Module"));

        if (source.Contains(PopupParam.Bulletin))
        {
            this.chkBulletin.Checked = true;
        }
        if (source.Contains(PopupParam.CompanyNews))
        {
            this.chkCompanyNews.Checked = true;
        }
        if (source.Contains(PopupParam.Workflow))
        {
            this.chkWorkflow.Checked = true;
        }
        if (source.Contains(PopupParam.Schedule))
        {
            this.chkSchedule.Checked = true;
        }
        if (source.Contains(PopupParam.Mail))
        {
            this.chkMail.Checked = true;
        }
        if (source.Contains(PopupParam.Warning))
        {
            this.chkWarning.Checked = true;
        }
    }