示例#1
0
        /// <summary>
        /// 增加新的提醒到提醒表
        /// </summary>
        public static void SaveNewRemind(string strType, string strMasterCode, string strUser, string strMessage, DateTime StartDate, DateTime EndDate)
        {
            // 检查当前MasterCode当前用户是否有重复,如果有则更新
            EntityData entity = RemindDAO.GetRemindObjectByMasterUser(strType, strMasterCode, strUser);

            if (entity.HasRecord())
            {
                DataTable dt = entity.CurrentTable;
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    dt.Rows[i]["CreateDate"] = StartDate;
                    dt.Rows[i]["EndDate"]    = EndDate;
                }
                RemindDAO.UpdateRemindObject(entity);
            }
            else
            {
                EntityData entityRemind = new EntityData("RemindObject");
                DataRow    drRemind     = entityRemind.GetNewRecord();
                drRemind["RemindObjectCode"] = DAL.EntityDAO.SystemManageDAO.GetNewSysCode("RemindObject");
                drRemind["Type"]             = strType;
                drRemind["User"]             = strUser;
                drRemind["MasterCode"]       = strMasterCode;
                drRemind["Message"]          = strMessage;
                drRemind["CreateDate"]       = StartDate;
                drRemind["EndDate"]          = EndDate;
                drRemind["IsDesk"]           = "1";       // 默认桌面显示
                entityRemind.AddNewRecord(drRemind);
                RemindDAO.InsertRemindObject(entityRemind);
                entityRemind.Dispose();
            }
            entity.Dispose();
        }
示例#2
0
文件: OARule.cs 项目: ishui/rms2
        public static void ViewRemindUpDate(string type, string masterCode, string userCode)
        {
            EntityData entity = RemindDAO.GetRemindObjectByMasterUser(type, masterCode, userCode);

            if (entity.HasRecord())
            {
                entity.CurrentRow["IsDesk"] = "0";
                RemindDAO.UpdateRemindObject(entity);
            }
            entity.Dispose();
        }