コード例 #1
0
ファイル: CancelMeetingForm.xaml.cs プロジェクト: jjg0519/OA
        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();
            }
        }
コード例 #2
0
        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);
                    }
                }
            }
        }
コード例 #3
0
 //更新会议室信息
 public void MeetingRoomUpdate(T_OA_MEETINGROOM obj)
 {
     using (MeetingRoomBll RoomBll = new MeetingRoomBll())
     {
         RoomBll.UpdateRoomInfo(obj);
     }
 }
コード例 #4
0
ファイル: MeetingManagementService.cs プロジェクト: JuRogn/OA
 //添加会议室信息
 public string MeetingRoomdAdd(T_OA_MEETINGROOM obj)
 {
     using (MeetingRoomBll RoomBll = new MeetingRoomBll())
     {
         return RoomBll.AddRoomInfo(obj); ;
     }
 }
コード例 #5
0
 public MeetingRoomChildWindow(Action operationType, T_OA_MEETINGROOM RoomObj)
 {
     InitializeComponent();
     actions = operationType;
     roomObj = RoomObj;
     this.Loaded += new RoutedEventHandler(MeetingRoomChildWindow_Loaded);
 }
コード例 #6
0
ファイル: MeetingRoomAppForm.xaml.cs プロジェクト: jjg0519/OA
        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"));
            }
        }
コード例 #7
0
ファイル: MeetingRoomAppForm.xaml.cs プロジェクト: jjg0519/OA
        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);
            }
        }
コード例 #8
0
 //添加会议室信息
 public string MeetingRoomdAdd(T_OA_MEETINGROOM obj)
 {
     using (MeetingRoomBll RoomBll = new MeetingRoomBll())
     {
         return(RoomBll.AddRoomInfo(obj));;
     }
 }
コード例 #9
0
 public MeetingRoomChildWindow(Action operationType, T_OA_MEETINGROOM RoomObj)
 {
     InitializeComponent();
     actions      = operationType;
     roomObj      = RoomObj;
     this.Loaded += new RoutedEventHandler(MeetingRoomChildWindow_Loaded);
 }
コード例 #10
0
        void DaGr_CurrentCellChanged(object sender, EventArgs e)
        {
            DataGrid grid = sender as DataGrid;

            if (grid.SelectedItem != null)
            {
                SelectedMeetingRoom = (T_OA_MEETINGROOM)grid.SelectedItems[0];
            }
        }
コード例 #11
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;
 }
コード例 #12
0
 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();
 }
コード例 #13
0
ファイル: MeetingRoomForm.xaml.cs プロジェクト: jjg0519/OA
        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;
        }
コード例 #14
0
        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];
            }
        }
コード例 #15
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);
 }
コード例 #16
0
        //添加会议室申请内容
        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;
                
            }

        }
コード例 #17
0
        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;
            }
        }
コード例 #18
0
ファイル: EmceeMeetingForm.xaml.cs プロジェクト: jjg0519/OA
 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();
 }
コード例 #19
0
ファイル: EmceeMeetingForm.xaml.cs プロジェクト: JuRogn/OA
 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();
 }
コード例 #20
0
ファイル: SelectMeetingRoom.xaml.cs プロジェクト: jjg0519/OA
        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;
                        }
                    }
                }
            }
        }
コード例 #21
0
ファイル: MeetingRoomForm.xaml.cs プロジェクト: jjg0519/OA
        //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();
        }
コード例 #22
0
ファイル: MeetingRoomForm.xaml.cs プロジェクト: JuRogn/OA
 //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();
     
   
 }
コード例 #23
0
ファイル: MeetingManagementService.cs プロジェクト: JuRogn/OA
 //更新会议室信息
 public void MeetingRoomUpdate(T_OA_MEETINGROOM obj)
 {
     using (MeetingRoomBll RoomBll = new MeetingRoomBll())
     {
         RoomBll.UpdateRoomInfo(obj);
     }
 }
コード例 #24
0
ファイル: CancelMeetingForm.xaml.cs プロジェクト: JuRogn/OA
 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();
         
     }
     
 }
コード例 #25
0
ファイル: MeetingRoomAppForm.xaml.cs プロジェクト: JuRogn/OA
        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);
                
            }

        }
コード例 #26
0
        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;
            }
        }
コード例 #27
0
ファイル: EngineServices.svc.cs プロジェクト: JuRogn/OA
        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;

            }

        }
コード例 #28
0
 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;
     }
 }
コード例 #29
0
ファイル: MeetingRoomForm.xaml.cs プロジェクト: JuRogn/OA
        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;
            
            
        }
コード例 #30
0
ファイル: MeetingForm.xaml.cs プロジェクト: JuRogn/OA
        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();

            }

        }
コード例 #31
0
        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;
            }
        }
コード例 #32
0
ファイル: MeetingRoomForm.xaml.cs プロジェクト: jjg0519/OA
        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());
            }
        }
コード例 #33
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);
        }
コード例 #34
0
        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;
            }
        }
コード例 #35
0
ファイル: MeetingForm.xaml.cs プロジェクト: JuRogn/OA
        private void browser_ReloadDataEvent()
        {
            if (addFrm.SelectedMeetingRoom != null )
            {
                SelectMeetingRoom = addFrm.SelectedMeetingRoom;
                this.txtMeetingRoom.Text = addFrm.SelectedMeetingRoom.MEETINGROOMNAME;
                
            }

        }
コード例 #36
0
 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];
     }
 }
コード例 #37
0
ファイル: MeetingRoomForm.xaml.cs プロジェクト: JuRogn/OA
        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());
            }
        }
コード例 #38
0
ファイル: MeetingRoomAppForm.xaml.cs プロジェクト: jjg0519/OA
        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());
                }
            }
        }
コード例 #39
0
ファイル: MeetingRoomAppForm.xaml.cs プロジェクト: JuRogn/OA
        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;
            }
            

        }
コード例 #40
0
ファイル: MeetingRoomForm.xaml.cs プロジェクト: JuRogn/OA
 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;
     }
 }
コード例 #41
0
ファイル: SelectMeetingRoom.xaml.cs プロジェクト: JuRogn/OA
 void DaGr_CurrentCellChanged(object sender, EventArgs e)
 {
     DataGrid grid = sender as DataGrid;
     if (grid.SelectedItem != null)
     {
         SelectedMeetingRoom = (T_OA_MEETINGROOM)grid.SelectedItems[0];
     }
 }
コード例 #42
0
ファイル: SelectMeetingRoom.xaml.cs プロジェクト: JuRogn/OA
 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();
 }
コード例 #43
0
ファイル: SelectMeetingRoom.xaml.cs プロジェクト: JuRogn/OA
 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;
                 }
             }
         }
     }
 }
コード例 #44
0
ファイル: MeetingRoomAppForm.xaml.cs プロジェクト: jjg0519/OA
        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;
            }
        }
コード例 #45
0
ファイル: SelectMeetingRoom.xaml.cs プロジェクト: JuRogn/OA
 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);
             }
         }
     }
 }
コード例 #46
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;
 }
コード例 #47
0
ファイル: MeetingRoomAppForm.xaml.cs プロジェクト: JuRogn/OA
        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());                    
                }
            }

            
        }