public int ModifyByTemp1(FoWoSoft.Data.Model.MeetInfo meetInfo) { string sql = @"UPDATE MeetInfo SET ApplicatId=@ApplicatId, MeetTimes=@MeetTimes, MeetName=@MeetName, AdminId=@AdminId, MeetId=@MeetId,temp2=@temp2, Date1=@Date1, test1=@test1, test=@test, typeid=@typeid, type=@type, Reason=@Reason, inland=@inland, abroad=@abroad WHERE temp1=@temp1"; SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@ApplicatId", meetInfo.ApplicatId), new SqlParameter("@MeetTimes", meetInfo.MeetTimes), new SqlParameter("@MeetName", meetInfo.MeetName), new SqlParameter("@AdminId", meetInfo.AdminId), new SqlParameter("@MeetId", meetInfo.MeetId), new SqlParameter("@temp1", meetInfo.temp1), new SqlParameter("@temp2", meetInfo.temp2), new SqlParameter("@Date1", meetInfo.Date1), new SqlParameter("@test1", meetInfo.test1), new SqlParameter("@test", meetInfo.test), new SqlParameter("@typeid", meetInfo.typeid), new SqlParameter("@type", meetInfo.type), new SqlParameter("@Reason", meetInfo.Reason), new SqlParameter("@inland", meetInfo.inland), new SqlParameter("@abroad", meetInfo.abroad), }; return(new DBHelper().Execute(sql, parameters)); }
public void CreateNewTempTestMeet(FoWoSoft.Data.Model.MeetInfo meetInfot) { MeetInfoModel meetInfo = meetInfot as MeetInfoModel; string testMeetid; meetInfoService.RoomisUpdate(meetInfo, out testMeetid); var tempmeet = Common.Tools.MeetInfoToTempTestMeet(meetInfo, testMeetid); new FoWoSoft.Platform.TempTestMeet().RoomisAdd(tempmeet); var aplicatUser = new FoWoSoft.Platform.Users().GetByAccount(meetInfo.ApplicatId); var adminUser = new FoWoSoft.Platform.Users().GetByAccount(meetInfo.AdminId); var task = new FoWoSoft.Data.Model.WorkFlowTask { InstanceID = testMeetid, Title = meetInfo.temp2, SenderID = aplicatUser.ID, SenderName = aplicatUser.Name, ReceiveID = adminUser.ID, ReceiveName = adminUser.Name }; new FoWoSoft.Platform.WorkFlowTask().RoomisCreate(task); }
public int RoomisModify(FoWoSoft.Data.Model.MeetInfo meetInfo) { var result = meetInfoService.ModifyByTemp1(meetInfo); if (result > 0) { var meetinfot = meetInfoService.GetByTemp1(meetInfo.temp1); if (meetinfot != null) { var tempTestMeet = Common.Tools.MeetInfoToTempTestMeet(meetInfo, meetinfot.temp3); new TempTestMeet().RoomisModify(tempTestMeet); } } return(result); }
public int Create(FoWoSoft.Data.Model.MeetInfo meetInfo) { if (meetInfoService.MeetInfoRepeat(meetInfo.temp1)) { return(-1); } var result = meetInfoService.Create(meetInfo); if (result > 0) { CreateNewTempTestMeet(meetInfo); } return(result); }
public void CreateNewTempTestMeet(FoWoSoft.Data.Model.MeetInfo meetInfot) { MeetInfoModel meetInfo = meetInfot as MeetInfoModel; string testMeetid; meetInfoService.RoomisUpdate(meetInfo, out testMeetid); var tempmeet = Common.Tools.MeetInfoToTempTestMeet(meetInfo, testMeetid); new FoWoSoft.Platform.TempTestMeet().RoomisAdd(tempmeet); var aplicatUser = new FoWoSoft.Platform.Users().GetByAccount(meetInfo.ApplicatId); var adminUser = new FoWoSoft.Platform.Users().GetByAccount(meetInfo.AdminId); var task = new FoWoSoft.Data.Model.WorkFlowTask { InstanceID = testMeetid, Title = meetInfo.temp2, SenderID = aplicatUser.ID, SenderName = aplicatUser.Name, ReceiveID = adminUser.ID, ReceiveName = adminUser.Name }; new FoWoSoft.Platform.WorkFlowTask().RoomisCreate(task); //由***部门,***(人名),申请的会议名称为:****会议申请,需要您审核。 var userInfoEdu = new EduWebService().GetUser(meetInfo.ApplicatId); if (userInfoEdu != null) { // var meetMsgProgress = $"由{userInfoEdu.BMMC}部门,{userInfoEdu.XM}(人名),申请的会议名称为:{meetInfo.temp2},"; // var msg = $"{meetMsgProgress}会议申请,需要您审核。"; var msg = string.Format(DuanxinService.DuanxinSendMsg4, userInfoEdu.BMMC, userInfoEdu.XM, meetInfo.temp2); //20180110短信发送 new DuanxinService().smsSend(meetInfo.AdminId, msg); } }
public int Create(FoWoSoft.Data.Model.MeetInfo meetInfo) { string sql = @"INSERT INTO MeetInfo( ApplicatId , MeetTimes , MeetId , MeetName , AdminId,temp1 ,temp2 ,Date1, test1, test, typeid, type, Reason, inland, abroad ) VALUES ( @ApplicatId,@MeetTimes,@MeetId ,@MeetName,@AdminId ,@temp1 ,@temp2,@Date1, @test1, @test, @typeid, @type, @Reason, @inland, @abroad )"; SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@ApplicatId", meetInfo.ApplicatId), new SqlParameter("@MeetTimes", meetInfo.MeetTimes), new SqlParameter("@MeetName", meetInfo.MeetName), new SqlParameter("@AdminId", meetInfo.AdminId), new SqlParameter("@MeetId", meetInfo.MeetId), new SqlParameter("@temp1", meetInfo.temp1), new SqlParameter("@temp2", meetInfo.temp2), new SqlParameter("@Date1", meetInfo.Date1), new SqlParameter("@test1", meetInfo.test1), new SqlParameter("@test", meetInfo.test), new SqlParameter("@typeid", meetInfo.typeid), new SqlParameter("@type", meetInfo.type), new SqlParameter("@Reason", meetInfo.Reason), new SqlParameter("@inland", meetInfo.inland), new SqlParameter("@abroad", meetInfo.abroad), }; return(new DBHelper().Execute(sql, parameters)); }
/// <summary> /// 将DataRedar转换为List /// </summary> private List <FoWoSoft.Data.Model.MeetInfo> DataReaderToList(SqlDataReader dataReader) { List <FoWoSoft.Data.Model.MeetInfo> List = new List <FoWoSoft.Data.Model.MeetInfo>(); FoWoSoft.Data.Model.MeetInfo model = null; while (dataReader.Read()) { model = new FoWoSoft.Data.Model.MeetInfo(); model.Id = dataReader.GetInt32(0); model.ApplicatId = dataReader.GetString(1); model.MeetTimes = dataReader.GetDateTime(2).ToString(); model.MeetId = dataReader.GetString(3); model.MeetName = dataReader.GetString(4); model.AdminId = dataReader.GetString(5); if (!dataReader.IsDBNull(6)) { model.temp1 = dataReader.GetString(6); } if (!dataReader.IsDBNull(7)) { model.temp2 = dataReader.GetString(7); } if (!dataReader.IsDBNull(8)) { model.temp3 = dataReader.GetString(8); } if (!dataReader.IsDBNull(9)) { model.Date1 = dataReader.GetDateTime(9); } if (!dataReader.IsDBNull(10)) { model.test1 = dataReader.GetString(10); } if (!dataReader.IsDBNull(11)) { model.test = dataReader.GetString(11); } if (!dataReader.IsDBNull(12)) { model.typeid = dataReader.GetString(12); } if (!dataReader.IsDBNull(13)) { model.type = dataReader.GetString(13); } if (!dataReader.IsDBNull(14)) { model.Reason = dataReader.GetString(14); } if (!dataReader.IsDBNull(15)) { model.inland = dataReader.GetString(15); } if (!dataReader.IsDBNull(16)) { model.abroad = dataReader.GetString(16); } List.Add(model); } return(List); }
public int RoomisUpdate(FoWoSoft.Data.Model.MeetInfo meetInfo, out string testMeetid) { testMeetid = Guid.NewGuid().ToString(); return(new DBHelper().Execute("update meetInfo set temp3='" + testMeetid.ToString().ToUpper() + "' where temp1='" + meetInfo.temp1 + "'")); }
public int RoomisUpdate(FoWoSoft.Data.Model.MeetInfo meetInfo, out string testMeetid) { return(dataMeetInfo.RoomisUpdate(meetInfo, out testMeetid)); }
public int ModifyByTemp1(FoWoSoft.Data.Model.MeetInfo meetInfo) { return(dataMeetInfo.ModifyByTemp1(meetInfo)); }
public int Create(FoWoSoft.Data.Model.MeetInfo meetInfo) { return(dataMeetInfo.Create(meetInfo)); }