Ejemplo n.º 1
0
        /// <summary>
        /// 可调休假
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void attendanceClient_GetAdjustableVacationCompleted(object sender, GetAdjustableVacationCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                if (e.Result != null)
                {
                    var v = from t in e.Result
                            group t by
                            new
                    {
                        t.EMPLOYEEID,
                        t.cname
                    } into g
                        select new AbnormalAttendanceeEntity
                    {
                        //员工ID
                        EMPLOYEEID = g.Key.EMPLOYEEID,
                        //员工姓名
                        cname = g.Key.cname,

                        //可调休假
                        AdjustableDay = g.Sum(c => c.AdjustableDay)
                    };
                    abnormalAttendanceeEntity3 = v.ToList();
                }
            }
            else
            {
                MessageBox.Show("可调休假服务错误,错误信息GetAdjustableVacation:" + e.Error.ToString());
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 可调休假
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void attendanceClient_GetAdjustableVacationCompleted(object sender, GetAdjustableVacationCompletedEventArgs e)
        {
            if (e.Error==null)
            {
                if (e.Result!=null)
                {
                    var v = from t in e.Result
                            group t by
                            new
                            {
                                t.EMPLOYEEID,
                                t.cname
                            } into g
                            select new AbnormalAttendanceeEntity 
                            {
                                //员工ID
                                EMPLOYEEID = g.Key.EMPLOYEEID,
                                //员工姓名
                                cname = g.Key.cname,

                                //可调休假
                                AdjustableDay = g.Sum(c=>c.AdjustableDay)
                            };
                    abnormalAttendanceeEntity3 = v.ToList();
                }
            }
            else
            {
                MessageBox.Show("可调休假服务错误,错误信息GetAdjustableVacation:"+e.Error .ToString());
            }
        }