private void personal_dataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 3)
            {
                StaffLog sf = (StaffLog)personal_dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Tag;
                writeLog wl = new writeLog();
                wl.User              = sf.Staff;
                wl.LogDate           = new DateTime(sf.WriteTime);
                wl.IsComment         = true;
                wl.CommentPersonName = this.User.KuName;
                wl.ShowDialog();
            }

            else if (e.ColumnIndex == 4 && this.personal_dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString() == "删除")
            {
                if (MessageBox.Show("确定要删除吗?", "提示", MessageBoxButtons.OKCancel) == DialogResult.OK)
                {
                    StaffLog sf = (StaffLog)personal_dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex - 1].Tag;
                    sf.State = (int)IEntity.stateEnum.Deleted;
                    baseService.SaveOrUpdateEntity(sf);
                    this.personal_dataGridView.Rows.RemoveAt(e.RowIndex);
                }
            }

            //else if (e.ColumnIndex == 5 && this.personal_dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString() == "修改")
            //{
            //    StaffLog sf = (StaffLog)personal_dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Tag;
            //    writeLog wl = new writeLog();
            //    wl.User = sf.Staff;
            //    wl.LogDate = new DateTime(sf.WriteTime);
            //    wl.IsComment = true;
            //    wl.CommentPersonName = this.User.KuName;
            //    wl.ShowDialog();
            //}
        }
 /// <summary>
 /// 表二中查看
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dataGridView2_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 2)
     {
         StaffLog sf = (StaffLog)dataGridView2.Rows[e.RowIndex].Tag;
         writeLog wl = new writeLog();
         wl.User              = sf.Staff;
         wl.LogDate           = new DateTime(sf.WriteTime);
         wl.IsComment         = true;
         wl.CommentPersonName = this.User.KuName;
         wl.ShowDialog();
     }
 }
Example #3
0
 private void initialData()
 {
     if (typeof(writeLog) == ParentForm1.GetType())
     {
         writeLog wl = (writeLog)ParentForm1;
         shareList = wl.SharedUser;
     }
     else if (typeof(writeSchedule) == ParentForm1.GetType())
     {
         writeSchedule ws = (writeSchedule)ParentForm1;
         shareList = ws.SharedUser;
     }
 }
Example #4
0
 private void save_button_Click(object sender, EventArgs e)
 {
     if (typeof(writeLog) == ParentForm1.GetType())
     {
         writeLog wl = (writeLog)ParentForm1;
         wl.SharedUser = shareList;
     }
     else if (typeof(writeSchedule) == ParentForm1.GetType())
     {
         writeSchedule ws = (writeSchedule)ParentForm1;
         ws.SharedUser = shareList;
     }
     MessageBox.Show("保存成功!");
     this.Close();
 }
        private void share_dataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 5)
            {
                StaffLog thelog = new StaffLog();
                object[] sf     = (object[])share_dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Tag;
                thelog = (StaffLog)baseService.loadEntity(thelog, Convert.ToInt64(sf[0].ToString()));

                writeLog wl = new writeLog();
                wl.User              = thelog.Staff;
                wl.LogDate           = new DateTime(thelog.WriteTime);
                wl.IsComment         = true;
                wl.CommentPersonName = this.user.KuName;
                wl.ShowDialog();
            }
        }
Example #6
0
 private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     if (write_log == null || write_log.IsDisposed)
     {
         write_log      = new writeLog();
         write_log.User = main.User;
     }
     if (!write_log.Created)
     {
         write_log.Show();
     }
     else
     {
         write_log.WindowState = FormWindowState.Normal;
         write_log.Focus();
     }
     if (write_log.DialogResult == DialogResult.OK)
     {
         if (main.IsWriteLog == 0)
         {
             main.IsWriteLog = 1;
         }
     }
 }
Example #7
0
 private void pictureBox_rizhi_Click(object sender, EventArgs e)
 {
     PictureBox p = (PictureBox)sender;
     writeLog log = new writeLog();
     log.IsView = true;
     log.User = this.user;
     log.CommentPersonName = this.User.KuName;
     log.LogDate = (DateTime)p.Parent.Tag;
     log.ShowDialog();
 }
        void l1_Click(object sender, EventArgs e)
        {
            LinkLabel l1 = (LinkLabel)sender;

            if (l1.Tag.GetType() == typeof(KjqbService.LogInService))
            {
                KjqbService.LogInService ll = (KjqbService.LogInService)l1.Tag;
                StaffLog ss = new StaffLog();
                ss = (StaffLog)baseService.loadEntity(ss, ll.LogId);
                if (ss.State == 0)
                {
                    writeLog wl = new writeLog();
                    wl.User = ss.Staff;
                    wl.LogDate = new DateTime(ss.WriteTime);
                    wl.IsComment = true;
                    wl.CommentPersonName = this.User.KuName;
                    wl.ShowDialog();
                }
                else
                {
                    MessageBox.Show("该篇日志作者已经删除");
                }

            }
            else if (l1.Tag.GetType() == typeof(KjqbService.CommentInService))
            {
                KjqbService.CommentInService ll = (KjqbService.CommentInService)l1.Tag;
                StaffLog ss = new StaffLog();
                ss = (StaffLog)baseService.loadEntity(ss, ll.LogId);
                if (ss.State == 0)
                {
                    writeLog wl = new writeLog();
                    wl.User = ss.Staff;
                    wl.LogDate = new DateTime(ss.WriteTime);
                    wl.IsComment = true;
                    wl.CommentPersonName = this.User.KuName;
                    wl.ShowDialog();
                }
                else
                {
                    MessageBox.Show("该篇日志作者已经删除");
                }
            }
            else if (l1.Tag.GetType() == typeof(KjqbService.ScheduleInService))
            {
                KjqbService.ScheduleInService ll = (KjqbService.ScheduleInService)l1.Tag;
                StaffSchedule ss = new StaffSchedule();
                ss = (StaffSchedule)baseService.loadEntity(ss, ll.ScheduleId);
                DateTime dt = new DateTime(ss.ScheduleTime);
                MessageBox.Show(dt.ToString("yyyy-MM-dd HH:mm:ss") + " :" + ss.Content);
            }
            else if (l1.Tag.GetType() == typeof(KjqbService.LeaveInService))
            {
                //KjqbService.LeaveInService ll = (KjqbService.LeaveInService)l1.Tag;
                //LeaveManage tt = new LeaveManage();
                //tt = (LeaveManage)baseService.loadEntity(tt, ll.LeaveId);

                if (leaveWindow == null || leaveWindow.IsDisposed)
                {
                    leaveWindow = new Leave();
                    leaveWindow.Leaveman = this.user;
                    leaveWindow.Role = role;
                }
                if (!leaveWindow.Created)
                {
                    leaveWindow.Show();
                }
                else
                {
                    leaveWindow.WindowState = FormWindowState.Normal;
                    leaveWindow.Focus();
                }
            }
            else if (l1.Tag.GetType() == typeof(KjqbService.BusinessService))
            {
                if (businessManagement == null || businessManagement.IsDisposed)
                {
                    businessManagement = new BusinessManagement();
                }
                if (!businessManagement.Created)
                {
                    businessManagement.User = this.User;
                    businessManagement.Role = this.Role;
                    businessManagement.Show();
                }
                else
                {
                    businessManagement.WindowState = FormWindowState.Normal;
                    businessManagement.Focus();
                }
            }
        }
Example #9
0
        void item_ContentClicked(object sender, EventArgs e)
        {
            Label p = (Label)sender;
            long logid = long.Parse(p.Parent.Tag.ToString());
            p.Parent.Cursor = Cursors.WaitCursor;
            StaffLog sl = new StaffLog();
            baseService.loadEntity(sl, logid);
            writeLog log = new writeLog();
            log.IsComment = true;
            log.User = sl.Staff;
            log.CommentPersonName = User.KuName;
            log.LogDate = new DateTime(sl.WriteTime);
            log.ShowDialog();
            panelOfLogCommentMessageItem item = (panelOfLogCommentMessageItem)p.Parent;
            this.panelOfLogCommentMessage1.RemoveCommentItem(item);

            p.Parent.Cursor = Cursors.Hand;
        }
Example #10
0
 //写日志
 private void log_pictureBox_Click(object sender, EventArgs e)
 {
     if (write_log == null || write_log.IsDisposed)
     {
         write_log = new writeLog();
         write_log.User = this.user;
     }
     if (!write_log.Created)
     {
         write_log.Show();
     }
     else
     {
         write_log.WindowState = FormWindowState.Normal;
         write_log.Focus();
     }
     if (write_log.DialogResult == DialogResult.OK)
     {
         if (isWriteLog == 0)
         {
             isWriteLog = 1;
         }
     }
 }
Example #11
0
 private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     if (write_log == null || write_log.IsDisposed)
     {
         write_log = new writeLog();
         write_log.User = main.User;
     }
     if (!write_log.Created)
     {
         write_log.Show();
     }
     else
     {
         write_log.WindowState = FormWindowState.Normal;
         write_log.Focus();
     }
     if (write_log.DialogResult == DialogResult.OK)
     {
         if (main.IsWriteLog == 0)
         {
             main.IsWriteLog = 1;
         }
     }
 }
Example #12
0
        void l1_Click(object sender, EventArgs e)
        {
            LinkLabel l1 = (LinkLabel)sender;

            if (l1.Tag.GetType() == typeof(KjqbService.LogInService))
            {
                KjqbService.LogInService ll = (KjqbService.LogInService)l1.Tag;
                StaffLog ss = new StaffLog();
                ss = (StaffLog)baseService.loadEntity(ss, ll.LogId);
                if (ss.State == 0)
                {
                    writeLog wl = new writeLog();
                    wl.User              = ss.Staff;
                    wl.LogDate           = new DateTime(ss.WriteTime);
                    wl.IsComment         = true;
                    wl.CommentPersonName = this.User.KuName;
                    wl.ShowDialog();
                }
                else
                {
                    MessageBox.Show("该篇日志作者已经删除");
                }
            }
            else if (l1.Tag.GetType() == typeof(KjqbService.CommentInService))
            {
                KjqbService.CommentInService ll = (KjqbService.CommentInService)l1.Tag;
                StaffLog ss = new StaffLog();
                ss = (StaffLog)baseService.loadEntity(ss, ll.LogId);
                if (ss.State == 0)
                {
                    writeLog wl = new writeLog();
                    wl.User              = ss.Staff;
                    wl.LogDate           = new DateTime(ss.WriteTime);
                    wl.IsComment         = true;
                    wl.CommentPersonName = this.User.KuName;
                    wl.ShowDialog();
                }
                else
                {
                    MessageBox.Show("该篇日志作者已经删除");
                }
            }
            else if (l1.Tag.GetType() == typeof(KjqbService.ScheduleInService))
            {
                KjqbService.ScheduleInService ll = (KjqbService.ScheduleInService)l1.Tag;
                StaffSchedule ss = new StaffSchedule();
                ss = (StaffSchedule)baseService.loadEntity(ss, ll.ScheduleId);
                DateTime dt = new DateTime(ss.ScheduleTime);
                MessageBox.Show(dt.ToString("yyyy-MM-dd HH:mm:ss") + " :" + ss.Content);
            }
            else if (l1.Tag.GetType() == typeof(KjqbService.LeaveInService))
            {
                //KjqbService.LeaveInService ll = (KjqbService.LeaveInService)l1.Tag;
                //LeaveManage tt = new LeaveManage();
                //tt = (LeaveManage)baseService.loadEntity(tt, ll.LeaveId);

                if (leaveWindow == null || leaveWindow.IsDisposed)
                {
                    leaveWindow          = new Leave();
                    leaveWindow.Leaveman = this.user;
                    leaveWindow.Role     = role;
                }
                if (!leaveWindow.Created)
                {
                    leaveWindow.Show();
                }
                else
                {
                    leaveWindow.WindowState = FormWindowState.Normal;
                    leaveWindow.Focus();
                }
            }
            else if (l1.Tag.GetType() == typeof(KjqbService.BusinessService))
            {
                if (businessManagement == null || businessManagement.IsDisposed)
                {
                    businessManagement = new BusinessManagement();
                }
                if (!businessManagement.Created)
                {
                    businessManagement.User = this.User;
                    businessManagement.Role = this.Role;
                    businessManagement.Show();
                }
                else
                {
                    businessManagement.WindowState = FormWindowState.Normal;
                    businessManagement.Focus();
                }
            }
        }
        private void share_dataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 5)
            {
                StaffLog thelog = new StaffLog();
                object[] sf = (object[])share_dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Tag;
                thelog = (StaffLog)baseService.loadEntity(thelog, Convert.ToInt64(sf[0].ToString()));

                writeLog wl = new writeLog();
                wl.User = thelog.Staff;
                wl.LogDate = new DateTime(thelog.WriteTime);
                wl.IsComment = true;
                wl.CommentPersonName = this.user.KuName;
                wl.ShowDialog();
            }
        }
        private void personal_dataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 3)
            {
                StaffLog sf = (StaffLog)personal_dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Tag;
                writeLog wl = new writeLog();
                wl.User = sf.Staff;
                wl.LogDate = new DateTime(sf.WriteTime);
                wl.IsComment = true;
                wl.CommentPersonName = this.User.KuName;
                wl.ShowDialog();
            }

            else if (e.ColumnIndex == 4 && this.personal_dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString() == "删除")
            {
                if (MessageBox.Show("确定要删除吗?", "提示", MessageBoxButtons.OKCancel) == DialogResult.OK)
                {
                    StaffLog sf = (StaffLog)personal_dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex - 1].Tag;
                    sf.State = (int)IEntity.stateEnum.Deleted;
                    baseService.SaveOrUpdateEntity(sf);
                    this.personal_dataGridView.Rows.RemoveAt(e.RowIndex);
                }
            }

            //else if (e.ColumnIndex == 5 && this.personal_dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString() == "修改")
            //{
            //    StaffLog sf = (StaffLog)personal_dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Tag;
            //    writeLog wl = new writeLog();
            //    wl.User = sf.Staff;
            //    wl.LogDate = new DateTime(sf.WriteTime);
            //    wl.IsComment = true;
            //    wl.CommentPersonName = this.User.KuName;
            //    wl.ShowDialog();
            //}
        }
 /// <summary>
 /// 查看
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dataGridView3_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if(e.ColumnIndex  == 4)
     {
         StaffLog sf = (StaffLog)dataGridView3.Rows[e.RowIndex].Tag;
         writeLog wl = new writeLog();
         wl.User = sf.Staff;
         wl.LogDate = new DateTime(sf.WriteTime);
         wl.IsComment = true;
         wl.CommentPersonName = this.User.KuName;
         wl.ShowDialog();
     }
 }