private void GetMeetingInfoByInfo(V_MeetingInfo MeetingInfoT) { loadbar.Start(); if (MeetingInfoT != null) { tmpMeetingInfo = MeetingInfoT.meetinginfo; //cbxMeetingType.SelectedItem = MeetingInfoT.MEETINGTYPE; //cbMeetingRoom.SelectedItem = MeetingInfoT.MEETINGROOMNAME; txtMeetingRoom.Text = MeetingInfoT.meetingroom.MEETINGROOMNAME; txtMeetingRoom.SelectedItem = MeetingInfoT.meetingroom; SelectMeetingRoom = MeetingInfoT.meetingroom; SelectMeetingType = MeetingInfoT.meetingtype; tbxMeetingTitle.Text = MeetingInfoT.meetinginfo.MEETINGTITLE; tbxMeetingContent.RichTextBoxContext = MeetingInfoT.meetinginfo.CONTENT; dpStartDate.Text = Convert.ToDateTime(MeetingInfoT.meetinginfo.STARTTIME).ToShortDateString(); dpEndDate.Text = Convert.ToDateTime(MeetingInfoT.meetinginfo.ENDTIME).ToShortDateString(); txtTel.Text = MeetingInfoT.meetinginfo.TEL; PostsObject.Text = MeetingInfoT.meetinginfo.DEPARTNAME; strStartTime = Convert.ToDateTime(MeetingInfoT.meetinginfo.STARTTIME).ToShortTimeString(); tpStartTime.Value = MeetingInfoT.meetinginfo.STARTTIME; tpEndTime.Value = MeetingInfoT.meetinginfo.ENDTIME; tbxHostMembers.Text = MeetingInfoT.meetinginfo.HOSTNAME; tbxRecordMembers.Text = MeetingInfoT.meetinginfo.RECORDUSERNAME; combox_MeetingRoomSelectSource(); combox_SelectSource(); } }
private void myChkBox_Checked(object sender, RoutedEventArgs e) { CheckBox chkbox = sender as CheckBox; chkbox.Style = Application.Current.Resources["CheckBoxStyle"] as Style; if (chkbox.IsChecked.Value) { MeetingRoomObj = chkbox.DataContext as T_OA_MEETINGROOM; if (MeetingRoomObj != null) { if (MeetingRoomInfoList.Count > 0) { var entity = from q in MeetingRoomInfoList where q.MEETINGROOMID == MeetingRoomObj.MEETINGROOMID select q; if (entity.Count() == 0) { MeetingRoomInfoList.Add(MeetingRoomObj); } } else { MeetingRoomInfoList.Add(MeetingRoomObj); } } } }
//更新会议室信息 public void MeetingRoomUpdate(T_OA_MEETINGROOM obj) { using (MeetingRoomBll RoomBll = new MeetingRoomBll()) { RoomBll.UpdateRoomInfo(obj); } }
//添加会议室信息 public string MeetingRoomdAdd(T_OA_MEETINGROOM obj) { using (MeetingRoomBll RoomBll = new MeetingRoomBll()) { return RoomBll.AddRoomInfo(obj); ; } }
public MeetingRoomChildWindow(Action operationType, T_OA_MEETINGROOM RoomObj) { InitializeComponent(); actions = operationType; roomObj = RoomObj; this.Loaded += new RoutedEventHandler(MeetingRoomChildWindow_Loaded); }
void MeetingRoomClient_GetMeetingRoomNameInfosToComboxCompleted(object sender, GetMeetingRoomNameInfosToComboxCompletedEventArgs e) { if (e.Result != null) { this.cbMeetingRoom.Items.Clear(); this.cbMeetingRoom.ItemsSource = e.Result; this.cbMeetingRoom.DisplayMemberPath = "MEETINGROOMNAME"; if (SelectedMeetingRoom.MEETINGROOMID != null) { foreach (var item in cbMeetingRoom.Items) { T_OA_MEETINGROOM dict = item as T_OA_MEETINGROOM; if (dict != null) { if (dict.MEETINGROOMNAME == SelectedMeetingRoom.MEETINGROOMNAME) { cbMeetingRoom.SelectedItem = item; break; } } } } else { cbMeetingRoom.SelectedIndex = 0; } } else { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("FOUNDMEETINGROOM"), Utility.GetResourceStr("CONFIRMBUTTON")); } }
private void GetMeetingRoomAppInfo(T_OA_MEETINGROOMAPP RoomAppT, T_OA_MEETINGROOM RoomObj) { if (RoomAppT != null) { //cbMeetingRoom.SelectedItem = RoomAppT.MEETINGROOMNAME; txtTel.Text = RoomAppT.TEL; dpStartDate.Text = Convert.ToDateTime(RoomAppT.STARTTIME).ToShortDateString(); dpEndDate.Text = Convert.ToDateTime(RoomAppT.ENDTIME).ToShortDateString(); //strStartTime = RoomAppT.STARTTIME.ToShortTimeString(); //strEndTime = RoomAppT.ENDTIME.ToShortTimeString(); tpStartTime.Value = RoomAppT.STARTTIME; tpEndTime.Value = RoomAppT.ENDTIME; SelectedMeetingRoom = RoomObj; CompanyObject.Text = RoomAppT.DEPARTNAME; combox_MeetingRoomSelectSource(); //GetDepartmentNameByDepartmentID(RoomAppT.DEPARTNAME); //tpEndTime.SelectedItem = RoomAppT.ENDTIME.ToShortTimeString(); } if (actions == FormTypes.Audit || actions == FormTypes.Browse) { this.Loaded += new RoutedEventHandler(MeetingRoomAppForm_Loaded); } }
//添加会议室信息 public string MeetingRoomdAdd(T_OA_MEETINGROOM obj) { using (MeetingRoomBll RoomBll = new MeetingRoomBll()) { return(RoomBll.AddRoomInfo(obj));; } }
void DaGr_CurrentCellChanged(object sender, EventArgs e) { DataGrid grid = sender as DataGrid; if (grid.SelectedItem != null) { SelectedMeetingRoom = (T_OA_MEETINGROOM)grid.SelectedItems[0]; } }
public EmceeMemberMeetingForm(T_OA_MEETINGINFO meetinginfo,V_MyMeetingInfosManagement objVMeeting,T_OA_MEETINGROOM RoomObj) { InitializeComponent(); tmpStaff = objVMeeting.OAMeetingStaffT; //ctrFile.SystemName = "OA"; //ctrFile.ModelName = "MeetingApp"; //ctrFile.InitBtn(Visibility.Collapsed, Visibility.Collapsed); //ShowMeetingInfos(meetinginfo,objVMeeting,RoomObj); StrContentID = objVMeeting.OAMeetingContentT.MEETINGCONTENTID; }
private void BindData(List <T_OA_MEETINGROOM> obj) { if (obj == null || obj.Count < 1) { DaGr.ItemsSource = null; return; } DaGr.ItemsSource = obj; currentItem = obj.FirstOrDefault(); //SelectedMeetingRoom = obj.FirstOrDefault(); }
private void GetMeetingRoomByID(T_OA_MEETINGROOM RoomObj) { if (!string.IsNullOrEmpty(RoomObj.MEETINGROOMNAME)) { tbxMeetingRoomName.Text = RoomObj.MEETINGROOMNAME; } GetCompanyNameByCompanyID(RoomObj.COMPANYID); //备注 tbxMeetingAddress.Text = RoomObj.LOCATION; tbxDemo.Text = RoomObj.REMARK; }
void DaGr_SelectionChanged(object sender, SelectionChangedEventArgs e) { DataGrid grid = sender as DataGrid; if (grid.SelectedItems.Count == 0) { return; } if (grid.SelectedItems.Count > 0) { SelectedMeetingRoom = (T_OA_MEETINGROOM)grid.SelectedItems[0]; } }
void ShowMeetingInfos(T_OA_MEETINGINFO meetinginfo, V_MyMeetingInfosManagement objV, T_OA_MEETINGROOM RoomObj) { tblTitle.Text = Utility.GetResourceStr("MEETINGDETAIL"); this.tblMeetingTitle.Text = meetinginfo.MEETINGTITLE; this.tblMeetingRoom.Text = RoomObj.MEETINGROOMNAME; this.tblStartTime.Text = Convert.ToDateTime(meetinginfo.STARTTIME).ToShortDateString() + " "+ Convert.ToDateTime(meetinginfo.STARTTIME).ToShortTimeString(); this.tblEndTime.Text = Convert.ToDateTime(meetinginfo.ENDTIME).ToShortDateString() + " " + Convert.ToDateTime(meetinginfo.ENDTIME).ToShortTimeString(); tblMeetingContent.RichTextBoxContext = meetinginfo.CONTENT; this.tblMyMeetingContent.Text = HttpUtility.HtmlDecode(objV.OAMeetingContentT.CONTENT); MeetingClient.UpdateMeetingStaffsByEmcceCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(MeetingClient_UpdateMeetingStaffsByEmcceCompleted); }
//添加会议室申请内容 public string AddMeetingRoomAppInfo(T_OA_MEETINGROOMAPP RoomAppInfo) { try { string StrReturn = ""; //var tempEnt = DataContext.T_OA_MEETINGROOMAPP.FirstOrDefault(s => s.T_OA_MEETINGROOM.MEETINGROOMNAME == RoomAppInfo.T_OA_MEETINGROOM.MEETINGROOMNAME // && s.STARTTIME == RoomAppInfo.STARTTIME && s.ENDTIME == RoomAppInfo.ENDTIME && s.DEPARTNAME == RoomAppInfo.DEPARTNAME); var tempEnt = dal.GetObjects().FirstOrDefault(s => s.T_OA_MEETINGROOM.MEETINGROOMNAME == RoomAppInfo.T_OA_MEETINGROOM.MEETINGROOMNAME && s.CHECKSTATE == "2" && s.STARTTIME < RoomAppInfo.ENDTIME && s.ENDTIME > RoomAppInfo.STARTTIME); if (tempEnt != null) { StrReturn = "REPETITION"; //{0}已存在,保存失败! } else { //Utility.RefreshEntity(RoomAppInfo); T_OA_MEETINGROOM ent = (from e in dal.GetObjects<T_OA_MEETINGROOM>() where e.MEETINGROOMID == RoomAppInfo.T_OA_MEETINGROOM.MEETINGROOMID select e ).FirstOrDefault(); RoomAppInfo.T_OA_MEETINGROOM = ent; RoomAppInfo.CREATEDATE = DateTime.Now; base.Add(RoomAppInfo); int i = 1; if (!(i > 0)) { StrReturn = "SAVEFAILED";//保存失败 } } return StrReturn; } catch (Exception ex) { Tracer.Debug("会议室申请信息MeetingRoomAppManagementBll-AddMeetingRoomAppInfo" + System.DateTime.Now.ToString() + " " + ex.ToString()); return null; } }
void MeetingClient_GetMeetingRoomByIDCompleted(object sender, GetMeetingRoomByIdCompletedEventArgs e) { T_OA_MEETINGROOM Room = e.Result; tmpmeetingRoom = Room; if (Room != null) { //MeetingManagementServiceClient mrClient = new MeetingManagementServiceClient(); if (!string.IsNullOrEmpty(Room.MEETINGROOMNAME)) { txtRoom.Text = Room.MEETINGROOMNAME; } GetCompanyNameByCompanyID(Room.COMPANYID); //备注 txtremark.Text = Room.REMARK; } }
public EmceeMeetingForm(V_MyMeetingInfosManagement objV) { InitializeComponent(); GetMeetingInfo(objV); //NewButton(); tmpMeetingInfoT = new T_OA_MEETINGINFO(); tmpMeetingInfoT = objV.OAMeetingInfoT; tmpRoom = objV.meetingroom;// 2010-08-03 ToolBar.btnNew.Visibility = Visibility.Collapsed; ToolBar.btnEdit.Visibility = Visibility.Collapsed; ToolBar.btnDelete.Visibility = Visibility.Collapsed; ToolBar.btnAudit.Visibility = Visibility.Collapsed; ToolBar.stpCheckState.Visibility = Visibility.Collapsed; ToolBar.BtnView.Click += new RoutedEventHandler(BtnView_Click); tmpmeeting = objV; DaGr.CurrentCellChanged += new EventHandler <EventArgs>(DaGr_CurrentCellChanged); MeetingClient.GetMeetingStaffByMeetingInfoIdEmceeCompleted += new EventHandler <GetMeetingStaffByMeetingInfoIdEmceeCompletedEventArgs>(MeetingClient_GetMeetingStaffByMeetingInfoIdEmceeCompleted); LoadMeetingStaffInfos(); }
public EmceeMeetingForm(V_MyMeetingInfosManagement objV) { InitializeComponent(); GetMeetingInfo(objV); //NewButton(); tmpMeetingInfoT = new T_OA_MEETINGINFO(); tmpMeetingInfoT = objV.OAMeetingInfoT; tmpRoom = objV.meetingroom;// 2010-08-03 ToolBar.btnNew.Visibility = Visibility.Collapsed; ToolBar.btnEdit.Visibility = Visibility.Collapsed; ToolBar.btnDelete.Visibility = Visibility.Collapsed; ToolBar.btnAudit.Visibility = Visibility.Collapsed; ToolBar.stpCheckState.Visibility = Visibility.Collapsed; ToolBar.BtnView.Click += new RoutedEventHandler(BtnView_Click); tmpmeeting = objV; DaGr.CurrentCellChanged += new EventHandler<EventArgs>(DaGr_CurrentCellChanged); MeetingClient.GetMeetingStaffByMeetingInfoIdEmceeCompleted += new EventHandler<GetMeetingStaffByMeetingInfoIdEmceeCompletedEventArgs>(MeetingClient_GetMeetingStaffByMeetingInfoIdEmceeCompleted); LoadMeetingStaffInfos(); }
private void myChkBox_Unchecked(object sender, RoutedEventArgs e) { CheckBox chkbox = sender as CheckBox; if (!chkbox.IsChecked.Value) { MeetingRoomObj = (T_OA_MEETINGROOM)chkbox.DataContext; if (MeetingRoomObj != null) { foreach (var h in MeetingRoomInfoList) { if (h.MEETINGROOMID == MeetingRoomObj.MEETINGROOMID) { MeetingRoomInfoList.Remove(h); break; } } } } }
//private string testUsername = "******"; public MeetingRoomForm(Action operationType, T_OA_MEETINGROOM RoomObj) { InitializeComponent(); PARENT.Children.Add(loadbar); loadbar.Start(); MeetingClient.MeetingRoomdAddCompleted += new EventHandler <MeetingRoomdAddCompletedEventArgs>(RoomClient_MeetingRoomdAddCompleted); MeetingClient.GetMeetingRoomByIdCompleted += new EventHandler <GetMeetingRoomByIdCompletedEventArgs>(MeetingClient_GetMeetingRoomByIDCompleted); MeetingClient.MeetingRoomUpdateCompleted += new EventHandler <System.ComponentModel.AsyncCompletedEventArgs>(MeetingRoom_UpdateCompleted); switch (operationType) { case Action.Add: //this.tbtitle.Text = Utility.GetResourceStr("ADDTITLE", "MEETINGROOM"); ; break; case Action.Edit: //this.tbtitle.Text = Utility.GetResourceStr("EDITTITLE", "MEETINGROOM"); this.tbxMeetingRoomName.IsReadOnly = true; Utility.GetResourceStr("EDITTITLE", "MEETINGROOM"); GetMeetingRoomByID(RoomObj); break; case Action.Read: //this.tbtitle.Text = Utility.GetResourceStr("EDITTITLE", "MEETINGROOM"); this.tbxMeetingRoomName.IsReadOnly = true; this.tbxDemo.IsEnabled = false; this.tbxMeetingRoomName.IsEnabled = false; this.tbxMeetingAddress.IsEnabled = false; Utility.GetResourceStr("VIEWTITLE", "MEETINGROOM"); GetMeetingRoomByID(RoomObj); break; } if (operationType == Action.Edit) { //this.tbtitle.Text = Utility.GetResourceStr("EDITTITLE", "MEETINGROOM"); this.tbxMeetingRoomName.IsReadOnly = true; Utility.GetResourceStr("EDITTITLE", "MEETINGROOM"); GetMeetingRoomByID(RoomObj); } actions = operationType; loadbar.Stop(); }
//private string testUsername = "******"; public MeetingRoomForm(Action operationType, T_OA_MEETINGROOM RoomObj) { InitializeComponent(); PARENT.Children.Add(loadbar); loadbar.Start(); MeetingClient.MeetingRoomdAddCompleted += new EventHandler<MeetingRoomdAddCompletedEventArgs>(RoomClient_MeetingRoomdAddCompleted); MeetingClient.GetMeetingRoomByIdCompleted += new EventHandler<GetMeetingRoomByIdCompletedEventArgs>(MeetingClient_GetMeetingRoomByIDCompleted); MeetingClient.MeetingRoomUpdateCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(MeetingRoom_UpdateCompleted); switch (operationType) { case Action.Add: //this.tbtitle.Text = Utility.GetResourceStr("ADDTITLE", "MEETINGROOM"); ; break; case Action.Edit: //this.tbtitle.Text = Utility.GetResourceStr("EDITTITLE", "MEETINGROOM"); this.tbxMeetingRoomName.IsReadOnly = true; Utility.GetResourceStr("EDITTITLE", "MEETINGROOM"); GetMeetingRoomByID(RoomObj); break; case Action.Read: //this.tbtitle.Text = Utility.GetResourceStr("EDITTITLE", "MEETINGROOM"); this.tbxMeetingRoomName.IsReadOnly = true; this.tbxDemo.IsEnabled = false; this.tbxMeetingRoomName.IsEnabled = false; this.tbxMeetingAddress.IsEnabled = false; Utility.GetResourceStr("VIEWTITLE", "MEETINGROOM"); GetMeetingRoomByID(RoomObj); break; } if (operationType == Action.Edit) { //this.tbtitle.Text = Utility.GetResourceStr("EDITTITLE", "MEETINGROOM"); this.tbxMeetingRoomName.IsReadOnly = true; Utility.GetResourceStr("EDITTITLE", "MEETINGROOM"); GetMeetingRoomByID(RoomObj); } actions = operationType; loadbar.Stop(); }
private void GetMeetingRoomAppInfo(T_OA_MEETINGROOMAPP RoomAppT,T_OA_MEETINGROOM RoomObj) { if (RoomAppT != null) { //cbMeetingRoom.SelectedItem = RoomAppT.MEETINGROOMNAME; txtTel.Text = RoomAppT.TEL; dpStartDate.Text = Convert.ToDateTime(RoomAppT.STARTTIME).ToShortDateString(); dpEndDate.Text = Convert.ToDateTime(RoomAppT.ENDTIME).ToShortDateString(); //strStartTime = RoomAppT.STARTTIME.ToShortTimeString(); //strEndTime = RoomAppT.ENDTIME.ToShortTimeString(); tpStartTime.Value = RoomAppT.STARTTIME; tpEndTime.Value = RoomAppT.ENDTIME; SelectedMeetingRoom = RoomObj; CompanyObject.Text = RoomAppT.DEPARTNAME; combox_MeetingRoomSelectSource(); //GetDepartmentNameByDepartmentID(RoomAppT.DEPARTNAME); //tpEndTime.SelectedItem = RoomAppT.ENDTIME.ToShortTimeString(); } if (actions == FormTypes.Audit || actions == FormTypes.Browse) { this.Loaded += new RoutedEventHandler(MeetingRoomAppForm_Loaded); } }
private void Save() { try { if (actions == Action.Read) //查看 { RefreshUI(saveType); } else { if (Check()) { string name = ""; string remark = ""; string address = ""; string IsRostrum = "";//主席台 string IsVideo = "";//视频 string IsAudio = "";//音频 string IsNetwork = "";//有线网络 string IsWifi = "";//无线网络 string IsTel = "";//电话 string IsProjector = "";//投影仪 string IsAirConditioning = "";//空调 string IsWaterDispenser = "";//风扇 string StrSeat = ""; string StrArea = ""; //房间面积 StrSeat = this.txtseat.Text.ToString(); StrArea = this.txtarea.Text.ToString(); if (!string.IsNullOrEmpty(StrSeat)) { if (!(System.Convert.ToInt64(StrSeat) > 0)) { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SEATCOUNTMUSTLARGERZERO")); return; } } if (!string.IsNullOrEmpty(StrArea)) { if (!(System.Convert.ToInt64(StrArea) > 0)) { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ROOMAREAMUSTLARGERZERO")); return; } } name = txtRoom.Text.ToString(); remark = txtremark.Text.ToString(); address = txtPosition.Text.ToString(); if (this.chxRostrum.IsChecked == true) { IsRostrum = "1"; } else { IsRostrum = "0"; } if (this.chxVideo.IsChecked == true) { IsVideo = "1"; } else { IsVideo = "0"; } if (this.chxAudio.IsChecked == true) { IsAudio = "1"; } else { IsAudio = "0"; } if (this.chxNetwork.IsChecked == true) { IsNetwork = "1"; } else { IsNetwork = "0"; } if (this.chxWifi.IsChecked == true) { IsWifi = "1"; } else { IsWifi = "0"; } if (this.chxProjector.IsChecked == true) { IsProjector = "1"; } else { IsProjector = "0"; } if (this.chxTel.IsChecked == true) { IsTel = "1"; } else { IsTel = "0"; } if (this.chxWaterDispenser.IsChecked == true) { IsWaterDispenser = "1"; } else { IsWaterDispenser = "0"; } if (this.chxAirConditioning.IsChecked == true) { IsAirConditioning = "1"; } else { IsAirConditioning = "0"; } if (actions == Action.Add) { T_OA_MEETINGROOM MeetingRoom = new T_OA_MEETINGROOM(); MeetingRoom.MEETINGROOMID = System.Guid.NewGuid().ToString(); MeetingRoom.OWNERCOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; MeetingRoom.OWNERDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; MeetingRoom.OWNERID = Common.CurrentLoginUserInfo.EmployeeID; MeetingRoom.OWNERNAME = Common.CurrentLoginUserInfo.EmployeeName; MeetingRoom.OWNERPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID; MeetingRoom.CREATECOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; MeetingRoom.CREATEDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; MeetingRoom.CREATEUSERNAME = Common.CurrentLoginUserInfo.EmployeeName; MeetingRoom.CREATEPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID; MeetingRoom.CREATEUSERID = Common.CurrentLoginUserInfo.EmployeeID; MeetingRoom.UPDATEUSERNAME = ""; MeetingRoom.ROSTRUM = IsRostrum; MeetingRoom.VIDEO = IsVideo; MeetingRoom.AUDIO = IsAudio; MeetingRoom.WIFI = IsWifi; MeetingRoom.WATERDISPENSER = IsWaterDispenser; MeetingRoom.NETWORK = IsNetwork; MeetingRoom.TEL = IsTel; MeetingRoom.PROJECTOR = IsProjector; MeetingRoom.AIRCONDITIONING = IsAirConditioning; MeetingRoom.AREA = System.Convert.ToInt64(StrSeat); MeetingRoom.SEAT = System.Convert.ToInt64(StrSeat); MeetingRoom.MEETINGROOMNAME = name; MeetingRoom.REMARK = remark; MeetingRoom.LOCATION = address; MeetingRoom.CREATEDATE = System.DateTime.Now; MeetingRoom.UPDATEUSERID = ""; MeetingRoom.UPDATEDATE = null; MeetingRoom.COMPANYID = StrCompanyId; if (!string.IsNullOrEmpty(name)) { try { tmpmeetingRoom = MeetingRoom; RefreshUI(RefreshedTypes.ShowProgressBar); MeetingClient.MeetingRoomdAddAsync(MeetingRoom); } catch (Exception ex) { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), ex.ToString()); RefreshUI(RefreshedTypes.ProgressBar); return; } } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("REQUIRED", "MEETINGROOM")); this.txtRoom.Focus(); return; } } else { T_OA_MEETINGROOM MeetingRoom = new T_OA_MEETINGROOM(); MeetingRoom = tmpmeetingRoom; name = txtRoom.Text.ToString(); remark = txtremark.Text.ToString(); MeetingRoom.MEETINGROOMID = tmpmeetingRoom.MEETINGROOMID; MeetingRoom.MEETINGROOMNAME = name; MeetingRoom.REMARK = remark; MeetingRoom.LOCATION = address; MeetingRoom.ROSTRUM = IsRostrum; MeetingRoom.VIDEO = IsVideo; MeetingRoom.AUDIO = IsAudio; MeetingRoom.WIFI = IsWifi; MeetingRoom.WATERDISPENSER = IsWaterDispenser; MeetingRoom.NETWORK = IsNetwork; MeetingRoom.TEL = IsTel; MeetingRoom.PROJECTOR = IsProjector; MeetingRoom.AIRCONDITIONING = IsAirConditioning; MeetingRoom.AREA = System.Convert.ToInt64(txtarea.Text.ToString()); MeetingRoom.SEAT = System.Convert.ToInt64(txtseat.Text.ToString()); MeetingRoom.OWNERCOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; MeetingRoom.OWNERDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; MeetingRoom.OWNERID = Common.CurrentLoginUserInfo.EmployeeID; MeetingRoom.OWNERNAME = Common.CurrentLoginUserInfo.EmployeeName; MeetingRoom.OWNERPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID; MeetingRoom.UPDATEUSERNAME = Common.CurrentLoginUserInfo.EmployeeName; MeetingRoom.UPDATEUSERID = Common.CurrentLoginUserInfo.EmployeeID; MeetingRoom.UPDATEDATE = System.DateTime.Now; MeetingRoom.COMPANYID = StrCompanyId; try { //RoomClient.MeetingRoomUpdateCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(MeetingRoom_UpdateCompleted); RefreshUI(RefreshedTypes.ProgressBar); MeetingClient.MeetingRoomUpdateAsync(MeetingRoom); } catch (Exception ex) { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), ex.ToString()); RefreshUI(RefreshedTypes.ProgressBar); return; } } } } } catch (Exception ex) { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), ex.ToString()); return; } }
private static string AddMeetingInfo(IEnumerable<XElement> eGFunc) { try { string StrReturn = ""; if (eGFunc.Count() == 0) { return StrReturn; } string strEmployeeID = string.Empty; string strOwnerID = string.Empty; string strOwnerPostID = string.Empty; string strOwnerDepartmentID = string.Empty; string strOwnerCompanyID = string.Empty; foreach (var q in eGFunc) { string strName = q.Attribute("Name").Value; switch (strName) { case "CREATEUSERID": strEmployeeID = q.Attribute("Value").Value; break; case "OWNERID": strOwnerID = q.Attribute("Value").Value; break; case "OWNERPOSTID": strOwnerPostID = q.Attribute("Value").Value; break; case "OWNERDEPARTMENTID": strOwnerDepartmentID = q.Attribute("Value").Value; break; case "OWNERCOMPANYID": strOwnerCompanyID = q.Attribute("Value").Value; break; } } SmtOACommonOffice RoomApp = new SmtOACommonOffice(); string employeeid = strEmployeeID.Replace("{", "").Replace("}", ""); //if (pensionTmp == null) //{ T_OA_MEETINGROOMAPP entity = new T_OA_MEETINGROOMAPP(); entity.MEETINGROOMAPPID = Guid.NewGuid().ToString(); T_OA_MEETINGROOM room = new T_OA_MEETINGROOM(); List<T_OA_MEETINGROOM> listroom = new List<T_OA_MEETINGROOM>(); listroom = RoomApp.GetMeetingRoomNameInfosToCombox(); if (listroom.Count() > 0) room = listroom.FirstOrDefault(); else return StrReturn; entity.CREATEDATE = DateTime.Now; entity.OWNERID = strOwnerID; entity.OWNERPOSTID = strOwnerPostID; entity.OWNERDEPARTMENTID = strOwnerDepartmentID; entity.OWNERCOMPANYID = strOwnerCompanyID; entity.CREATEUSERID = strOwnerID; entity.CREATEPOSTID = strOwnerPostID; entity.CREATEDEPARTMENTID = strOwnerDepartmentID; entity.CREATECOMPANYID = strOwnerCompanyID; entity.T_OA_MEETINGROOM = room; entity.STARTTIME = DateTime.Now; entity.ENDTIME = DateTime.Now.AddDays(2); string strMsg = ""; //doc.SendDocAdd(entity); //ser.PensionMasterAdd(entity, ref strMsg); strMsg = RoomApp.MeetingRoomAppInfoAdd(entity); if (string.IsNullOrEmpty(strMsg)) { StrReturn = entity.MEETINGROOMAPPID; } return StrReturn; } catch (Exception e) { string abc = "<OA>Message=[" + e.Message + "]" + "<OA>Source=[" + e.Source + "]<OA>StackTrace=[" + e.StackTrace + "]<OA>TargetSite=[" + e.TargetSite + "]"; Tracer.Debug(abc); return abc; } }
private void GetMeetingRoomByID(T_OA_MEETINGROOM RoomObj) { if (!string.IsNullOrEmpty(RoomObj.MEETINGROOMNAME)) { txtRoom.Text = RoomObj.MEETINGROOMNAME; } tmpmeetingRoom = RoomObj; GetCompanyNameByCompanyID(RoomObj.COMPANYID); //备注 txtPosition.Text = RoomObj.LOCATION.IsNull() ? string.Empty : RoomObj.LOCATION; txtremark.Text = RoomObj.REMARK.IsNull() ? string.Empty : RoomObj.REMARK; txtseat.Text = RoomObj.SEAT.ToString(); txtarea.Text = RoomObj.AREA.ToString(); if (RoomObj.ROSTRUM == "1") { this.chxRostrum.IsChecked = true; } else { this.chxRostrum.IsChecked = false; } if (RoomObj.VIDEO == "1") { this.chxVideo.IsChecked = true; } else { this.chxVideo.IsChecked = false; } if (RoomObj.AUDIO == "1") { this.chxAudio.IsChecked = true; } else { this.chxAudio.IsChecked = false; } if (RoomObj.NETWORK == "1") { this.chxNetwork.IsChecked = true; } else { this.chxNetwork.IsChecked = false; } if (RoomObj.WIFI == "1") { this.chxWifi.IsChecked = true; } else { this.chxWifi.IsChecked = false; } if (RoomObj.WATERDISPENSER == "1") { this.chxWaterDispenser.IsChecked = true; } else { this.chxWaterDispenser.IsChecked = false; } if (RoomObj.TEL == "1") { this.chxTel.IsChecked = true; } else { this.chxTel.IsChecked = false; } if (RoomObj.PROJECTOR == "1") { this.chxProjector.IsChecked = true; } else { this.chxProjector.IsChecked = false; } if (RoomObj.AIRCONDITIONING == "1") { this.chxAirConditioning.IsChecked = true; } else { this.chxAirConditioning.IsChecked = false; } }
private void GetMeetingInfoByInfoAudit(T_OA_MEETINGINFO MeetingInfoT) { if (MeetingInfoT != null) { tmpMeetingInfo = MeetingInfoT; //cbxMeetingType.SelectedItem = MeetingInfoT.MEETINGTYPE; //cbMeetingRoom.SelectedItem = MeetingInfoT.MEETINGROOMNAME; txtMeetingRoom.Text = MeetingInfoT.T_OA_MEETINGROOM.MEETINGROOMNAME; //txtMeetingRoom.SelectedItem = MeetingInfoT.meetingroom; SelectMeetingRoom = MeetingInfoT.T_OA_MEETINGROOM; SelectMeetingType = MeetingInfoT.T_OA_MEETINGTYPE; tbxMeetingTitle.Text = MeetingInfoT.MEETINGTITLE; tbxMeetingContent.RichTextBoxContext = MeetingInfoT.CONTENT; dpStartDate.Text = Convert.ToDateTime(MeetingInfoT.STARTTIME).ToShortDateString(); dpEndDate.Text = Convert.ToDateTime(MeetingInfoT.ENDTIME).ToShortDateString(); txtTel.Text = MeetingInfoT.TEL; PostsObject.Text = MeetingInfoT.DEPARTNAME; strStartTime = Convert.ToDateTime(MeetingInfoT.STARTTIME).ToShortTimeString(); tpStartTime.Value = MeetingInfoT.STARTTIME; tpEndTime.Value = MeetingInfoT.ENDTIME; strEndTime = Convert.ToDateTime(MeetingInfoT.ENDTIME).ToShortTimeString(); tbxHostMembers.Text = MeetingInfoT.HOSTNAME; StrHostID = MeetingInfoT.HOSTID; tbxRecordMembers.Text = MeetingInfoT.RECORDUSERNAME; StrRecordID = MeetingInfoT.RECORDUSERID; combox_SelectSource(); } }
private void Save() { try { if (actions == Action.Read) //查看 { RefreshUI(saveType); } else { if (Check()) { string name = ""; string remark = ""; string address = ""; name = tbxMeetingRoomName.Text.ToString(); remark = tbxDemo.Text.ToString(); address = tbxMeetingAddress.Text.ToString(); if (actions == Action.Add) { T_OA_MEETINGROOM MeetingRoom = new T_OA_MEETINGROOM(); MeetingRoom.MEETINGROOMID = System.Guid.NewGuid().ToString(); MeetingRoom.OWNERCOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; MeetingRoom.OWNERDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; MeetingRoom.OWNERID = Common.CurrentLoginUserInfo.EmployeeID; MeetingRoom.OWNERNAME = Common.CurrentLoginUserInfo.EmployeeName; MeetingRoom.OWNERPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID; MeetingRoom.CREATECOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; MeetingRoom.CREATEDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; MeetingRoom.CREATEUSERNAME = Common.CurrentLoginUserInfo.EmployeeName; MeetingRoom.CREATEPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID; MeetingRoom.CREATEUSERID = Common.CurrentLoginUserInfo.EmployeeID; MeetingRoom.UPDATEUSERNAME = ""; MeetingRoom.MEETINGROOMNAME = name; MeetingRoom.REMARK = remark; MeetingRoom.LOCATION = address; MeetingRoom.CREATEDATE = System.DateTime.Now; MeetingRoom.UPDATEUSERID = ""; MeetingRoom.UPDATEDATE = null; MeetingRoom.COMPANYID = StrCompanyId; if (!string.IsNullOrEmpty(name)) { try { loadbar.Start(); tmpmeetingRoom = MeetingRoom; MeetingClient.MeetingRoomdAddAsync(MeetingRoom); } catch (Exception ex) { //HtmlPage.Window.Alert(ex.ToString()); Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), ex.ToString()); } } else { //MessageBox.Show("会议室名不能为空"); Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("REQUIRED", "MEETINGROOM")); this.tbxMeetingRoomName.Focus(); return; } } else { T_OA_MEETINGROOM MeetingRoom = new T_OA_MEETINGROOM(); MeetingRoom = tmpmeetingRoom; name = tbxMeetingRoomName.Text.ToString(); remark = tbxDemo.Text.ToString(); MeetingRoom.MEETINGROOMID = tmpmeetingRoom.MEETINGROOMID; MeetingRoom.MEETINGROOMNAME = name; MeetingRoom.REMARK = remark; MeetingRoom.LOCATION = address; MeetingRoom.OWNERCOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; MeetingRoom.OWNERDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; MeetingRoom.OWNERID = Common.CurrentLoginUserInfo.EmployeeID; MeetingRoom.OWNERNAME = Common.CurrentLoginUserInfo.EmployeeName; MeetingRoom.OWNERPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID; MeetingRoom.UPDATEUSERNAME = Common.CurrentLoginUserInfo.EmployeeName; MeetingRoom.UPDATEUSERID = Common.CurrentLoginUserInfo.EmployeeID; MeetingRoom.UPDATEDATE = System.DateTime.Now; MeetingRoom.COMPANYID = StrCompanyId; try { loadbar.Start(); MeetingClient.MeetingRoomUpdateAsync(MeetingRoom); } catch (Exception ex) { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("REQUIRED", "MEETINGROOM")); } } } } } catch (Exception ex) { //HtmlPage.Window.Alert(ex.ToString()); Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), ex.ToString()); } }
void ShowMeetingInfos(T_OA_MEETINGINFO meetinginfo, V_MyMeetingInfosManagement objV, T_OA_MEETINGROOM RoomObj) { tblTitle.Text = Utility.GetResourceStr("MEETINGDETAIL"); this.tblMeetingTitle.Text = meetinginfo.MEETINGTITLE; this.tblMeetingRoom.Text = RoomObj.MEETINGROOMNAME; this.tblStartTime.Text = Convert.ToDateTime(meetinginfo.STARTTIME).ToShortDateString() + " " + Convert.ToDateTime(meetinginfo.STARTTIME).ToShortTimeString(); this.tblEndTime.Text = Convert.ToDateTime(meetinginfo.ENDTIME).ToShortDateString() + " " + Convert.ToDateTime(meetinginfo.ENDTIME).ToShortTimeString(); tblMeetingContent.RichTextBoxContext = meetinginfo.CONTENT; this.tblMyMeetingContent.Text = HttpUtility.HtmlDecode(objV.OAMeetingContentT.CONTENT); MeetingClient.UpdateMeetingStaffsByEmcceCompleted += new EventHandler <System.ComponentModel.AsyncCompletedEventArgs>(MeetingClient_UpdateMeetingStaffsByEmcceCompleted); }
private void Save() { try { if (actions == Action.Read) //查看 { RefreshUI(saveType); } else { if (Check()) { string name = ""; string remark = ""; string address = ""; string IsRostrum = ""; //主席台 string IsVideo = ""; //视频 string IsAudio = ""; //音频 string IsNetwork = ""; //有线网络 string IsWifi = ""; //无线网络 string IsTel = ""; //电话 string IsProjector = ""; //投影仪 string IsAirConditioning = ""; //空调 string IsWaterDispenser = ""; //风扇 string StrSeat = ""; string StrArea = ""; //房间面积 StrSeat = this.txtseat.Text.ToString(); StrArea = this.txtarea.Text.ToString(); if (!string.IsNullOrEmpty(StrSeat)) { if (!(System.Convert.ToInt64(StrSeat) > 0)) { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SEATCOUNTMUSTLARGERZERO")); return; } } if (!string.IsNullOrEmpty(StrArea)) { if (!(System.Convert.ToInt64(StrArea) > 0)) { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ROOMAREAMUSTLARGERZERO")); return; } } name = txtRoom.Text.ToString(); remark = txtremark.Text.ToString(); address = txtPosition.Text.ToString(); if (this.chxRostrum.IsChecked == true) { IsRostrum = "1"; } else { IsRostrum = "0"; } if (this.chxVideo.IsChecked == true) { IsVideo = "1"; } else { IsVideo = "0"; } if (this.chxAudio.IsChecked == true) { IsAudio = "1"; } else { IsAudio = "0"; } if (this.chxNetwork.IsChecked == true) { IsNetwork = "1"; } else { IsNetwork = "0"; } if (this.chxWifi.IsChecked == true) { IsWifi = "1"; } else { IsWifi = "0"; } if (this.chxProjector.IsChecked == true) { IsProjector = "1"; } else { IsProjector = "0"; } if (this.chxTel.IsChecked == true) { IsTel = "1"; } else { IsTel = "0"; } if (this.chxWaterDispenser.IsChecked == true) { IsWaterDispenser = "1"; } else { IsWaterDispenser = "0"; } if (this.chxAirConditioning.IsChecked == true) { IsAirConditioning = "1"; } else { IsAirConditioning = "0"; } if (actions == Action.Add) { T_OA_MEETINGROOM MeetingRoom = new T_OA_MEETINGROOM(); MeetingRoom.MEETINGROOMID = System.Guid.NewGuid().ToString(); MeetingRoom.OWNERCOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; MeetingRoom.OWNERDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; MeetingRoom.OWNERID = Common.CurrentLoginUserInfo.EmployeeID; MeetingRoom.OWNERNAME = Common.CurrentLoginUserInfo.EmployeeName; MeetingRoom.OWNERPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID; MeetingRoom.CREATECOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; MeetingRoom.CREATEDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; MeetingRoom.CREATEUSERNAME = Common.CurrentLoginUserInfo.EmployeeName; MeetingRoom.CREATEPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID; MeetingRoom.CREATEUSERID = Common.CurrentLoginUserInfo.EmployeeID; MeetingRoom.UPDATEUSERNAME = ""; MeetingRoom.ROSTRUM = IsRostrum; MeetingRoom.VIDEO = IsVideo; MeetingRoom.AUDIO = IsAudio; MeetingRoom.WIFI = IsWifi; MeetingRoom.WATERDISPENSER = IsWaterDispenser; MeetingRoom.NETWORK = IsNetwork; MeetingRoom.TEL = IsTel; MeetingRoom.PROJECTOR = IsProjector; MeetingRoom.AIRCONDITIONING = IsAirConditioning; MeetingRoom.AREA = System.Convert.ToInt64(StrSeat); MeetingRoom.SEAT = System.Convert.ToInt64(StrSeat); MeetingRoom.MEETINGROOMNAME = name; MeetingRoom.REMARK = remark; MeetingRoom.LOCATION = address; MeetingRoom.CREATEDATE = System.DateTime.Now; MeetingRoom.UPDATEUSERID = ""; MeetingRoom.UPDATEDATE = null; MeetingRoom.COMPANYID = StrCompanyId; if (!string.IsNullOrEmpty(name)) { try { tmpmeetingRoom = MeetingRoom; RefreshUI(RefreshedTypes.ShowProgressBar); MeetingClient.MeetingRoomdAddAsync(MeetingRoom); } catch (Exception ex) { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), ex.ToString()); RefreshUI(RefreshedTypes.ProgressBar); return; } } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("REQUIRED", "MEETINGROOM")); this.txtRoom.Focus(); return; } } else { T_OA_MEETINGROOM MeetingRoom = new T_OA_MEETINGROOM(); MeetingRoom = tmpmeetingRoom; name = txtRoom.Text.ToString(); remark = txtremark.Text.ToString(); MeetingRoom.MEETINGROOMID = tmpmeetingRoom.MEETINGROOMID; MeetingRoom.MEETINGROOMNAME = name; MeetingRoom.REMARK = remark; MeetingRoom.LOCATION = address; MeetingRoom.ROSTRUM = IsRostrum; MeetingRoom.VIDEO = IsVideo; MeetingRoom.AUDIO = IsAudio; MeetingRoom.WIFI = IsWifi; MeetingRoom.WATERDISPENSER = IsWaterDispenser; MeetingRoom.NETWORK = IsNetwork; MeetingRoom.TEL = IsTel; MeetingRoom.PROJECTOR = IsProjector; MeetingRoom.AIRCONDITIONING = IsAirConditioning; MeetingRoom.AREA = System.Convert.ToInt64(txtarea.Text.ToString()); MeetingRoom.SEAT = System.Convert.ToInt64(txtseat.Text.ToString()); MeetingRoom.OWNERCOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; MeetingRoom.OWNERDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; MeetingRoom.OWNERID = Common.CurrentLoginUserInfo.EmployeeID; MeetingRoom.OWNERNAME = Common.CurrentLoginUserInfo.EmployeeName; MeetingRoom.OWNERPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID; MeetingRoom.UPDATEUSERNAME = Common.CurrentLoginUserInfo.EmployeeName; MeetingRoom.UPDATEUSERID = Common.CurrentLoginUserInfo.EmployeeID; MeetingRoom.UPDATEDATE = System.DateTime.Now; MeetingRoom.COMPANYID = StrCompanyId; try { //RoomClient.MeetingRoomUpdateCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(MeetingRoom_UpdateCompleted); RefreshUI(RefreshedTypes.ProgressBar); MeetingClient.MeetingRoomUpdateAsync(MeetingRoom); } catch (Exception ex) { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), ex.ToString()); RefreshUI(RefreshedTypes.ProgressBar); return; } } } } } catch (Exception ex) { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), ex.ToString()); return; } }
private void browser_ReloadDataEvent() { if (addFrm.SelectedMeetingRoom != null ) { SelectMeetingRoom = addFrm.SelectedMeetingRoom; this.txtMeetingRoom.Text = addFrm.SelectedMeetingRoom.MEETINGROOMNAME; } }
void DaGr_SelectionChanged(object sender, SelectionChangedEventArgs e) { DataGrid grid = sender as DataGrid; if (grid.SelectedItems.Count == 0) { return; } if (grid.SelectedItems.Count >0 ) { SelectedMeetingRoom = (T_OA_MEETINGROOM)grid.SelectedItems[0]; } }
private void SaveMeetingRoomApp() { string StrDepartment = ""; //部门 string StrStartDt = ""; //开始时间 string StrStartTime = ""; //开始时:分 string StrEndDt = ""; //结束时间 string StrEndTime = ""; //结束时:分 //string StrMeetingRoom = ""; //会议室名 //string StrError = ""; //错误提示信息 bool blError = true; //是否正确 string StrTel = ""; //联系电话 //StrMeetingRoom = this.cbMeetingRoom.SelectedItem.ToString(); StrTel = this.txtTel.Text.Trim().ToString(); StrDepartmentName = this.CompanyObject.Text.Trim().ToString(); if (string.IsNullOrEmpty(StrDepartmentName)) { //StrError += "公司部门不能为空\n"; Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTDEPART")); return; } if (!string.IsNullOrEmpty(this.dpStartDate.Text.ToString())) { StrStartDt = this.dpStartDate.Text.ToString(); } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("STARTTIMENOTNULL")); this.dpStartDate.Focus(); return; } if (!string.IsNullOrEmpty(this.dpEndDate.Text.ToString())) { StrEndDt = this.dpEndDate.Text.ToString(); } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ENDTIMENOTNULL")); this.dpEndDate.Focus(); return; } if (!string.IsNullOrEmpty(this.tpStartTime.Value.ToString())) { StrStartTime = this.tpStartTime.Value.Value.ToString("HH:mm"); } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("STARTTIMENOTNULL")); this.tpStartTime.Focus(); return; } if (!string.IsNullOrEmpty(this.tpEndTime.Value.ToString())) { StrEndTime = this.tpEndTime.Value.Value.ToString("HH:mm"); } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ENDTIMENOTNULL")); this.tpEndTime.Focus(); return; } DateTime DtStart = System.Convert.ToDateTime(StrStartDt + " " + StrStartTime); DateTime DtEnd = System.Convert.ToDateTime(StrEndDt + " " + StrEndTime); if (DtStart >= DtEnd) { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("STARTTIMENOTGREATENDTIME")); return; } if (cbMeetingRoom.SelectedIndex > -1) { SelectedMeetingRoom = cbMeetingRoom.SelectedItem as T_OA_MEETINGROOM; //StrMeetingType = SelectMeetingType.MEETINGTYPEID.ToString(); } RefreshUI(RefreshedTypes.ShowProgressBar); if (actions == FormTypes.New) { tmpRoomTimeT.MEETINGROOMAPPID = System.Guid.NewGuid().ToString(); tmpRoomTimeT.T_OA_MEETINGROOM = SelectedMeetingRoom; tmpRoomTimeT.DEPARTNAME = StrDepartmentName; tmpRoomTimeT.STARTTIME = DtStart; tmpRoomTimeT.ENDTIME = DtEnd; tmpRoomTimeT.CHECKSTATE = "0"; //申请状态 //tmpRoomTimeT.CREATEDATE = System.DateTime.Now; tmpRoomTimeT.ISCANCEL = "1"; tmpRoomTimeT.TEL = StrTel; tmpRoomTimeT.OWNERCOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; tmpRoomTimeT.OWNERDEPARTMENTID = StrDepartmentID;// Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; tmpRoomTimeT.OWNERID = Common.CurrentLoginUserInfo.EmployeeID; tmpRoomTimeT.OWNERNAME = Common.CurrentLoginUserInfo.EmployeeName; tmpRoomTimeT.OWNERPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID; tmpRoomTimeT.CREATECOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; tmpRoomTimeT.CREATEDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID; tmpRoomTimeT.CREATEUSERNAME = Common.CurrentLoginUserInfo.EmployeeName; tmpRoomTimeT.CREATEPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID; tmpRoomTimeT.CREATEUSERID = Common.CurrentLoginUserInfo.EmployeeID; tmpRoomTimeT.UPDATEUSERNAME = ""; tmpRoomTimeT.UPDATEDATE = null; tmpRoomTimeT.UPDATEUSERID = ""; try { MeetingClient.MeetingRoomAppInfoAddAsync(tmpRoomTimeT, "Add"); } catch (Exception ex) { RefreshUI(RefreshedTypes.HideProgressBar); //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), ex.ToString()); string _text = ""; MessageWindow.Show <string>("", ex.ToString(), MessageIcon.Error, result => _text = result, "Default", Utility.GetResourceStr("CONFIRM")); } } if (actions == FormTypes.Edit || actions == FormTypes.Resubmit) { tmpRoomTimeT.DEPARTNAME = StrDepartmentName; tmpRoomTimeT.STARTTIME = DtStart; tmpRoomTimeT.ENDTIME = DtEnd; tmpRoomTimeT.TEL = StrTel; tmpRoomTimeT.T_OA_MEETINGROOM = SelectedMeetingRoom; tmpRoomTimeT.CHECKSTATE = "0"; tmpRoomTimeT.UPDATEUSERNAME = Common.CurrentLoginUserInfo.EmployeeName; //tmpRoomTimeT.UPDATEDATE = System.DateTime.Now; tmpRoomTimeT.UPDATEUSERID = Common.CurrentLoginUserInfo.EmployeeID;; try { MeetingClient.MeetingRoomAppUpdateAsync(tmpRoomTimeT, "Edit"); } catch (Exception ex) { RefreshUI(RefreshedTypes.HideProgressBar); Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), ex.ToString()); } } }
public MeetingRoomAppForm(FormTypes actionenum, T_OA_MEETINGROOMAPP MeetingRoomAppT,T_OA_MEETINGROOM Room) { InitializeComponent(); InitEvent(); actions = actionenum; switch (actionenum) { case FormTypes.New: tmpRoomTimeT.CHECKSTATE = ((int)CheckStates.UnSubmit).ToString(); this.RowEditResult.Height = new GridLength(0); this.dpStartDate.Text = System.DateTime.Now.ToShortDateString(); this.dpEndDate.Text = System.DateTime.Now.ToShortDateString(); this.tpStartTime.Value = System.DateTime.Now; this.tpEndTime.Value = System.DateTime.Now.AddMinutes(30); combox_MeetingRoomSelectSource(); StrDepartmentName = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName; StrDepartmentID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; CompanyObject.Text = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName; break; case FormTypes.Edit: tmpRoomTimeT = MeetingRoomAppT; MeetingClient.GetMeetingRoomAppSingleInfoByAppIdAsync(MeetingRoomAppT.MEETINGROOMAPPID); break; case FormTypes.Resubmit: tmpRoomTimeT = MeetingRoomAppT; MeetingClient.GetMeetingRoomAppSingleInfoByAppIdAsync(MeetingRoomAppT.MEETINGROOMAPPID); break; case FormTypes.Browse: GetMeetingRoomAppInfo(MeetingRoomAppT, Room); tmpRoomTimeT = MeetingRoomAppT; this.RowEditResult.MaxHeight = 0; if (MeetingRoomAppT.CHECKSTATE == "1") { //this.audititem.Visibility = Visibility.Visible; } SetReadOnly(); break; case FormTypes.Audit: GetMeetingRoomAppInfo(MeetingRoomAppT, Room); tmpRoomTimeT = MeetingRoomAppT; //this.SPResult.Visibility = Visibility.Collapsed; this.RowEditResult.MaxHeight = 0; //this.audititem.Visibility = Visibility.Visible; SetReadOnly(); //audit.XmlObject = DataObjectToXml<T_OA_MEETINGROOMAPP>.ObjListToXml(tmpRoomTimeT, "OA"); break; } }
void MeetingClient_GetMeetingRoomByIDCompleted(object sender, GetMeetingRoomByIdCompletedEventArgs e) { T_OA_MEETINGROOM Room = e.Result; tmpmeetingRoom = Room; if (Room != null) { //MeetingManagementServiceClient mrClient = new MeetingManagementServiceClient(); if (!string.IsNullOrEmpty(Room.MEETINGROOMNAME)) { tbxMeetingRoomName.Text = Room.MEETINGROOMNAME; } GetCompanyNameByCompanyID(Room.COMPANYID); //备注 tbxDemo.Text = Room.REMARK; } }
private void BindData(List<T_OA_MEETINGROOM> obj) { if (obj == null || obj.Count < 1) { DaGr.ItemsSource = null; return; } DaGr.ItemsSource = obj; currentItem = obj.FirstOrDefault(); SelectedMeetingRoom = obj.FirstOrDefault(); }
public MeetingRoomAppForm(FormTypes actionenum, T_OA_MEETINGROOMAPP MeetingRoomAppT, T_OA_MEETINGROOM Room) { InitializeComponent(); InitEvent(); actions = actionenum; switch (actionenum) { case FormTypes.New: tmpRoomTimeT.CHECKSTATE = ((int)CheckStates.UnSubmit).ToString(); this.RowEditResult.Height = new GridLength(0); this.dpStartDate.Text = System.DateTime.Now.ToShortDateString(); this.dpEndDate.Text = System.DateTime.Now.ToShortDateString(); this.tpStartTime.Value = System.DateTime.Now; this.tpEndTime.Value = System.DateTime.Now.AddMinutes(30); combox_MeetingRoomSelectSource(); StrDepartmentName = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName; StrDepartmentID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; CompanyObject.Text = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName; break; case FormTypes.Edit: tmpRoomTimeT = MeetingRoomAppT; MeetingClient.GetMeetingRoomAppSingleInfoByAppIdAsync(MeetingRoomAppT.MEETINGROOMAPPID); break; case FormTypes.Resubmit: tmpRoomTimeT = MeetingRoomAppT; MeetingClient.GetMeetingRoomAppSingleInfoByAppIdAsync(MeetingRoomAppT.MEETINGROOMAPPID); break; case FormTypes.Browse: GetMeetingRoomAppInfo(MeetingRoomAppT, Room); tmpRoomTimeT = MeetingRoomAppT; this.RowEditResult.MaxHeight = 0; if (MeetingRoomAppT.CHECKSTATE == "1") { //this.audititem.Visibility = Visibility.Visible; } SetReadOnly(); break; case FormTypes.Audit: GetMeetingRoomAppInfo(MeetingRoomAppT, Room); tmpRoomTimeT = MeetingRoomAppT; //this.SPResult.Visibility = Visibility.Collapsed; this.RowEditResult.MaxHeight = 0; //this.audititem.Visibility = Visibility.Visible; SetReadOnly(); //audit.XmlObject = DataObjectToXml<T_OA_MEETINGROOMAPP>.ObjListToXml(tmpRoomTimeT, "OA"); break; } }
private void myChkBox_Checked(object sender, RoutedEventArgs e) { CheckBox chkbox = sender as CheckBox; if (chkbox.IsChecked.Value) { MeetingRoomObj = chkbox.DataContext as T_OA_MEETINGROOM; if (MeetingRoomObj != null) { if (MeetingRoomInfoList.Count > 0) { var entity = from q in MeetingRoomInfoList where q.MEETINGROOMID == MeetingRoomObj.MEETINGROOMID select q; if (entity.Count() == 0) { MeetingRoomInfoList.Add(MeetingRoomObj); } } else { MeetingRoomInfoList.Add(MeetingRoomObj); } } } }
public EmceeMemberMeetingForm(T_OA_MEETINGINFO meetinginfo, V_MyMeetingInfosManagement objVMeeting, T_OA_MEETINGROOM RoomObj) { InitializeComponent(); tmpStaff = objVMeeting.OAMeetingStaffT; //ctrFile.SystemName = "OA"; //ctrFile.ModelName = "MeetingApp"; //ctrFile.InitBtn(Visibility.Collapsed, Visibility.Collapsed); //ShowMeetingInfos(meetinginfo,objVMeeting,RoomObj); StrContentID = objVMeeting.OAMeetingContentT.MEETINGCONTENTID; }
private void SaveMeetingRoomApp() { string StrDepartment = ""; //部门 string StrStartDt = ""; //开始时间 string StrStartTime = ""; //开始时:分 string StrEndDt = ""; //结束时间 string StrEndTime = ""; //结束时:分 //string StrMeetingRoom = ""; //会议室名 //string StrError = ""; //错误提示信息 bool blError = true; //是否正确 string StrTel = ""; //联系电话 //StrMeetingRoom = this.cbMeetingRoom.SelectedItem.ToString(); StrTel = this.txtTel.Text.Trim().ToString(); StrDepartmentName = this.CompanyObject.Text.Trim().ToString(); if (string.IsNullOrEmpty(StrDepartmentName)) { //StrError += "公司部门不能为空\n"; Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTDEPART")); return; } if (!string.IsNullOrEmpty(this.dpStartDate.Text.ToString())) { StrStartDt = this.dpStartDate.Text.ToString(); } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("STARTTIMENOTNULL")); this.dpStartDate.Focus(); return; } if (!string.IsNullOrEmpty(this.dpEndDate.Text.ToString())) { StrEndDt = this.dpEndDate.Text.ToString(); } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ENDTIMENOTNULL")); this.dpEndDate.Focus(); return; } if (!string.IsNullOrEmpty(this.tpStartTime.Value.ToString())) { StrStartTime = this.tpStartTime.Value.Value.ToString("HH:mm"); } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("STARTTIMENOTNULL")); this.tpStartTime.Focus(); return; } if (!string.IsNullOrEmpty(this.tpEndTime.Value.ToString())) { StrEndTime = this.tpEndTime.Value.Value.ToString("HH:mm"); } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ENDTIMENOTNULL")); this.tpEndTime.Focus(); return; } DateTime DtStart = System.Convert.ToDateTime(StrStartDt + " " + StrStartTime); DateTime DtEnd = System.Convert.ToDateTime(StrEndDt + " " + StrEndTime); if (DtStart >= DtEnd) { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("STARTTIMENOTGREATENDTIME")); return; } if (cbMeetingRoom.SelectedIndex > -1) { SelectedMeetingRoom = cbMeetingRoom.SelectedItem as T_OA_MEETINGROOM; //StrMeetingType = SelectMeetingType.MEETINGTYPEID.ToString(); } RefreshUI(RefreshedTypes.ShowProgressBar); if (actions == FormTypes.New) { tmpRoomTimeT.MEETINGROOMAPPID = System.Guid.NewGuid().ToString(); tmpRoomTimeT.T_OA_MEETINGROOM = SelectedMeetingRoom; tmpRoomTimeT.DEPARTNAME = StrDepartmentName; tmpRoomTimeT.STARTTIME = DtStart; tmpRoomTimeT.ENDTIME = DtEnd; tmpRoomTimeT.CHECKSTATE = "0"; //申请状态 //tmpRoomTimeT.CREATEDATE = System.DateTime.Now; tmpRoomTimeT.ISCANCEL = "1"; tmpRoomTimeT.TEL = StrTel; tmpRoomTimeT.OWNERCOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; tmpRoomTimeT.OWNERDEPARTMENTID = StrDepartmentID;// Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; tmpRoomTimeT.OWNERID = Common.CurrentLoginUserInfo.EmployeeID; tmpRoomTimeT.OWNERNAME = Common.CurrentLoginUserInfo.EmployeeName; tmpRoomTimeT.OWNERPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID; tmpRoomTimeT.CREATECOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; tmpRoomTimeT.CREATEDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID; tmpRoomTimeT.CREATEUSERNAME = Common.CurrentLoginUserInfo.EmployeeName; tmpRoomTimeT.CREATEPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID; tmpRoomTimeT.CREATEUSERID = Common.CurrentLoginUserInfo.EmployeeID; tmpRoomTimeT.UPDATEUSERNAME = ""; tmpRoomTimeT.UPDATEDATE = null; tmpRoomTimeT.UPDATEUSERID = ""; try { MeetingClient.MeetingRoomAppInfoAddAsync(tmpRoomTimeT,"Add"); } catch (Exception ex) { RefreshUI(RefreshedTypes.HideProgressBar); //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), ex.ToString()); string _text = ""; MessageWindow.Show<string>("", ex.ToString(), MessageIcon.Error, result => _text = result, "Default", Utility.GetResourceStr("CONFIRM")); } } if (actions == FormTypes.Edit || actions== FormTypes.Resubmit) { tmpRoomTimeT.DEPARTNAME = StrDepartmentName; tmpRoomTimeT.STARTTIME = DtStart; tmpRoomTimeT.ENDTIME = DtEnd; tmpRoomTimeT.TEL = StrTel; tmpRoomTimeT.T_OA_MEETINGROOM = SelectedMeetingRoom; tmpRoomTimeT.CHECKSTATE = "0"; tmpRoomTimeT.UPDATEUSERNAME = Common.CurrentLoginUserInfo.EmployeeName; //tmpRoomTimeT.UPDATEDATE = System.DateTime.Now; tmpRoomTimeT.UPDATEUSERID = Common.CurrentLoginUserInfo.EmployeeID; ; try { MeetingClient.MeetingRoomAppUpdateAsync(tmpRoomTimeT,"Edit"); } catch (Exception ex) { RefreshUI(RefreshedTypes.HideProgressBar); Utility.ShowCustomMessage(MessageTypes.Message,Utility.GetResourceStr("ERROR"),ex.ToString()); } } }