Exemple #1
0
        public void OnLevelWasInitialized(int level)
        {
            if (m_scene)
            {
                // Look initialization
                try
                {
                    var female = Humans.First(h => h.sex == Human.SEX.FEMALE);
                    oldHeadLook.IsChecked = true;
                    oldHeadLook.Target    = (Transform)_eyeLookTargetInfo.GetValue(female.neckLook);
                    oldHeadLook.Type      = female.neckLook.CalcType;

                    oldHeadLook.IsChecked = true;
                    oldHeadLook.Target    = (Transform)_eyeLookTargetInfo.GetValue(female.eyeLook);
                    oldHeadLook.Type      = female.eyeLook.CalcType;
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }

                try
                {
                    var target = new GameObject().AddComponent <EyeTarget>();
                    target.rootNode = GameObject.Find("cf_J_Eye_ty").transform;

                    m_eyeTarget = target.transform;
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                    m_eyeTarget = Camera.main.transform;
                }
            }
        }
Exemple #2
0
        private void CreateMotions()
        {
            if (m_nextMotion != null)
            {
                m_motion = m_nextMotion;
            }
            m_nextMotion = new CameraMotion(Humans.First(m => m.sex == Human.SEX.FEMALE));

            if (m_motion == null)
            {
                m_motion = new CameraMotion(Humans.First(m => m.sex == Human.SEX.FEMALE));
            }

            illusionCamera.Set(
                m_motion.Focus,
                m_motion.Rotation,
                m_motion.Distance
                );
        }
Exemple #3
0
        /// <summary>
        /// 查询指定年月,工资发放名称的全部员工工资(包括未审批的)
        /// </summary>
        /// <param name="iYear">年</param>
        /// <param name="iMonth">月</param>
        /// <param name="strPayoffName">工资发放名称</param>
        /// <returns></returns>
        public System.Data.DataSet GetPayAudit(int iYear, int iMonth, string strPayoffName)
        {
            try
            {
                System.Data.DataSet dtsResult     = new PayOffDB().QueryPayAudit(iYear, iMonth, strPayoffName);
                DataSet             dtsDataSource = new DataSet();
                dtsDataSource.Tables.Add(new DataTable());
                PayRollItem[] oPayRollItems = new PayOffLogic().GetPayRollItems();
                //生成全部工资项列
                dtsDataSource.Tables[0].Columns.Add("员工姓名");
                foreach (PayRollItem item in oPayRollItems)
                {
                    dtsDataSource.Tables[0].Columns.Add(new DataColumn(item.Name));
                }
                dtsDataSource.Tables[0].Columns.Add("实际所得");
                dtsDataSource.Tables[0].Columns.Add("id");
                dtsDataSource.Tables[0].Columns.Add("审核状态");
                dtsDataSource.Tables[0].Columns.Add("审批状态");


                var result = (from DataRow row in dtsResult.Tables[0].Rows
                              group row by row["cHumanName"] into Humans
                              join DataRow row in dtsResult.Tables[0].Rows on Humans.Key.ToString() equals row["cHumanName"].ToString() into RollItems
                              select new
                {
                    ID = Humans.First()["id"],
                    HumanName = Humans.Key,
                    Rows = from DataRow row in RollItems
                           from System.Data.DataColumn col in dtsResult.Tables[0].Columns
                           where col.ColumnName != "cHumanName" && col.ColumnName != "realInCome"
                           select new
                    {
                        ColName = row["cPayRollName"],                       // 列名称
                        ColValue = row["realInCome"]                         // 列值
                    },
                    RealyInCome = (from DataRow row in RollItems
                                   from System.Data.DataColumn col in dtsResult.Tables[0].Columns
                                   where col.ColumnName == "realInCome" && row["cPayRollName"].ToString() == "实际所得"
                                   select row[col]).First()
                    , AssessState = Humans.First()["AssessState"]
                    ,
                    checkupState = Humans.First()["checkupState"]
                });

                int iCount = 0;

                foreach (var item in result)
                {
                    dtsDataSource.Tables[0].Rows.Add(new string[dtsResult.Tables[0].Columns.Count]);
                    dtsDataSource.Tables[0].Rows[iCount]["员工姓名"] = item.HumanName;
                    foreach (DataColumn column in dtsDataSource.Tables[0].Columns)
                    {
                        var rollItem = item.Rows.Where(p => p.ColName.ToString() == column.ColumnName).FirstOrDefault();
                        if (rollItem != null)
                        {
                            dtsDataSource.Tables[0].Rows[iCount][column.ColumnName] = rollItem.ColValue;
                        }
                    }
                    dtsDataSource.Tables[0].Rows[iCount]["id"]   = item.ID;
                    dtsDataSource.Tables[0].Rows[iCount]["审核状态"] = item.AssessState;
                    dtsDataSource.Tables[0].Rows[iCount]["审批状态"] = item.checkupState;
                    iCount++;
                }
                return(dtsDataSource);
            }
            catch (System.Data.SqlClient.SqlException)
            {
                return(null);
            }
        }