Beispiel #1
0
        private void BindData()
        {
            int intID = 0;

            if (int.TryParse(Request.QueryString["EmpID"], out intID))
            {
                using (MMSProDBDataContext db = new MMSProDBDataContext(ConfigurationManager.ConnectionStrings["mmsConString"].ConnectionString))
                {
                    EmpInfo di = db.EmpInfo.SingleOrDefault(a => a.EmpID == intID);
                    if (di != null)
                    {
                        this.txtAccount.Text = di.Account;
                        //this. txtPassword.Attributes.Add("Value", di.Password);
                        //this.txtRePassword.Attributes.Add("Value", di.Password);
                        this.txtEmpName.Text             = di.EmpName;
                        this.txtContact.Text             = di.Contact;
                        this.txtRemark.Text              = di.Remark;
                        this.ddlDepartment.SelectedValue = di.DepID.ToString();
                    }
                }
            }
            else
            {
                Response.Redirect("DepManager.aspx");
            }
        }
Beispiel #2
0
        private int reEmpId(string Emp)
        {
            int valueEmp = 0;

            try
            {
                using (MMSProDBDataContext dc = new MMSProDBDataContext(ConfigurationManager.ConnectionStrings["mmsConString"].ConnectionString))
                {
                    EmpInfo EI = dc.EmpInfo.SingleOrDefault(u => u.Account == Emp);
                    if (EI != null)
                    {
                        valueEmp = EI.EmpID;
                    }
                }
            }
            catch (Exception ex)
            {
                MethodBase    mb      = MethodBase.GetCurrentMethod();
                LogToDBHelper lhelper = LogToDBHelper.Instance;
                lhelper.WriteLog(ex.Message, "错误", string.Format("{0}.{1}", mb.ReflectedType.Name, mb.Name));
                ClientScript.RegisterClientScriptBlock(typeof(string), "提示", string.Format("<script>alert('{0}')</script>", LogToDBHelper.LOG_MSG_QUERYERROR));
            }

            return(valueEmp);
        }
Beispiel #3
0
        /// <summary>
        /// 查看个人信息
        /// </summary>
        /// <param name="roleID"></param>
        /// <param name="userID"></param>
        /// <param name="userName"></param>
        /// <returns></returns>
        public static List <EmpInfo> SelPersonalInfo(int userID)
        {
            string sql = @" select UserName,DepartmentName,UserAge,UserSex,UserTel,UserAddress,EntryTime,BasePay,UserRemarks from UserInfo u,Department d where u.DepartmentID=d.DepartmentID and UserID=@UserID ";

            SqlParameter[] param =
            {
                new SqlParameter("UserID", userID)
            };
            DataTable      dt   = Helper.DBHelper.GetDataTable(sql, param);
            List <EmpInfo> info = new List <EmpInfo>();

            foreach (DataRow item in dt.Rows)
            {
                EmpInfo empinfo = new EmpInfo
                {
                    UserName       = item["UserName"].ToString(),
                    DepartmentName = item["DepartmentName"].ToString(),
                    UserAge        = Convert.ToInt32(item["UserAge"]),
                    UserSex        = Convert.ToByte(item["UserSex"]),
                    UserTel        = item["UserTel"].ToString(),
                    UserAddress    = item["UserAddress"].ToString(),
                    EntryTime      = Convert.ToDateTime(item["EntryTime"]),
                    BasePay        = Convert.ToDouble(item["BasePay"]),
                    UserRemarks    = item["UserRemarks"].ToString()
                };
                info.Add(empinfo);
            }
            return(info);
        }
Beispiel #4
0
        /// <summary>
        ///  系统切换
        /// </summary>
        private void bbiSystem_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (this.MdiChildren.GetLength(0) > 0)
            {
                MessageHelper.ShowWarning("还有未关闭窗口,请关闭后再转换!");
                return;
            }

            LogHelper.Info(this, "切换系统 --- 关闭外部信息接口");
            infoRemoteAction.Close();

            LogHelper.Info(this, "切换系统 --- 关闭内部信息接口");
            infoLocalAction.Close();

            string code = e.Item.Tag.ToString();

            if (code == "OPC")
            {
                WindowsFormsSettings.DefaultFont = new Font(SystemFonts.DefaultFont.Name, 10);
            }
            else
            {
                WindowsFormsSettings.DefaultFont = new Font(SystemFonts.DefaultFont.Name, SystemFonts.DefaultFont.Size);
            }

            EmpInfo.SelectSystem(code);

            this.Init();
        }
        public string Insert(EmpInfo emp)
        {
            string _name = emp.Name;

            _name = Request["Name"];
            return(_name);
        }
Beispiel #6
0
        private EmpInfo getItem(SqlDataReader dr, EmpInfo item)
        {
            item.Id   = (int)dr["Id"];
            item.Name = dr["Name"].ToString();

            return(item);
        }
        public ActionResult ManipulateEmployee(EmpInfo emp)
        {
            string msg = "";

            if (emp.EMP_ID == 0)
            {
                flag = 1;
            }
            using (SqlConnection con = new SqlConnection(connction))
            {
                con.Open();
                using (SqlCommand cmd = new SqlCommand("EMP_CURD", con))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Flag", flag);
                    cmd.Parameters.AddWithValue("@Emp_id", emp.EMP_ID);
                    cmd.Parameters.AddWithValue("@Emp_Code", emp.Emp_Code);
                    cmd.Parameters.AddWithValue("@Emp_Name", emp.Emp_Name);
                    cmd.Parameters.AddWithValue("@Emp_Email", emp.Emp_Email);
                    cmd.Parameters.AddWithValue("@Emp_Phone", emp.Emp_Phone);
                    cmd.Parameters.AddWithValue("@Emp_Address", emp.Emp_Address);
                    cmd.Parameters.AddWithValue("@Emp_Age", emp.Emp_Age);
                    cmd.Parameters.AddWithValue("@Emp_Gender", emp.Emp_Gender);
                    cmd.Parameters.AddWithValue("@Emp_salary", emp.Emp_salary);
                    cmd.Parameters.AddWithValue("@Emp_Department", emp.Emp_Department);
                    cmd.Parameters.AddWithValue("@Emp_Designation", emp.Emp_Designation);
                    cmd.Parameters.Add("@Result", SqlDbType.NVarChar, 200);
                    cmd.Parameters["@Result"].Direction = ParameterDirection.Output;
                    cmd.ExecuteNonQuery();
                    msg = cmd.Parameters["@Result"].Value.ToString();
                }
            }

            return(Json(msg));
        }
Beispiel #8
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,IdEmp,SocialNumber,Name,Age,Address,Photo,Updated,JoinDay,LeaveDay,PosId")] EmpInfo empInfo)
        {
            if (id != empInfo.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(empInfo);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EmpInfoExists(empInfo.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["PosId"] = new SelectList(_context.Position, "Id", "Id", empInfo.PosId);
            return(View(empInfo));
        }
        public ActionResult EditEmployee(EmpInfo emp)
        {
            EmpInfo empInfo = new EmpInfo();

            using (SqlConnection con = new SqlConnection(connction))
            {
                con.Open();
                using (SqlCommand cmd = new SqlCommand("EMP_CURD", con))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Flag", 4);
                    cmd.Parameters.AddWithValue("@Emp_id", emp.EMP_ID);
                    cmd.Parameters.Add("@Result", SqlDbType.NVarChar, 200);
                    cmd.Parameters["@Result"].Direction = ParameterDirection.Output;
                    SqlDataReader dr = cmd.ExecuteReader();
                    while (dr.Read())
                    {
                        empInfo.EMP_ID          = dr.GetInt32(0);
                        empInfo.Emp_Code        = dr.GetString(1);
                        empInfo.Emp_Name        = dr.GetString(2);
                        empInfo.Emp_Email       = dr.GetString(3);
                        empInfo.Emp_Phone       = dr.GetString(4);
                        empInfo.Emp_Address     = dr.GetString(5);
                        empInfo.Emp_Department  = dr.GetString(6);
                        empInfo.Emp_Designation = dr.GetString(7);
                        empInfo.Emp_Age         = dr.GetInt32(8);
                        empInfo.Emp_salary      = dr.GetDouble(9);
                        empInfo.Emp_Gender      = dr.GetString(10);
                    }
                }
            }
            flag = 2;
            return(View(empInfo));
        }
Beispiel #10
0
 void btnSave_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(this.txtAccount.Text))
     {
         using (MMSProDBDataContext db = new MMSProDBDataContext(ConfigurationManager.ConnectionStrings["mmsConString"].ConnectionString))
         {
             //检查唯一性
             var temp = db.EmpInfo.SingleOrDefault(a => a.Account == this.txtAccount.Text.Trim());
             if (temp == null)
             {
                 EmpInfo ei = new EmpInfo();
                 ei.Account = this.txtAccount.Text.Trim();
                 ei.Contact = this.txtContact.Text.Trim();
                 if (this.ddlDepartment.SelectedIndex == 0)
                 {
                     ClientScript.RegisterClientScriptBlock(typeof(string), "ShowMessage", "<script>alert('请选择所属部门!')</script>");
                     return;
                 }
                 ei.DepID   = int.Parse(this.ddlDepartment.SelectedValue);
                 ei.EmpName = this.txtEmpName.Text.Trim();
                 //ei.Password = this.txtPassword.Text.Trim();
                 ei.Remark = this.txtRemark.Text.Trim();
                 db.EmpInfo.InsertOnSubmit(ei);
                 db.SubmitChanges();
                 Response.Redirect("EmpManager.aspx");
             }
             else
             {
                 ClientScript.RegisterClientScriptBlock(typeof(string), "ShowMessage", "<script>alert('账号已存在')</script>");
             }
         }
     }
 }
Beispiel #11
0
            public void data12()
            {
                string  inso1    = "Ash";
                EmpInfo instance = new EmpInfo();

                this.data(inso1);
                var ind = new EmpInfo();
            }
Beispiel #12
0
        public ActionResult Empinfo_post()
        {
            EmpInfo empinfo = new EmpInfo();

            //  empinfo.emp_id = admindb.GetEmployeeInfoByEmpid(empinfo.emp_id);
            admindb.GetEmployeeInfoByEmpid(empinfo);
            return(View(empinfo));
        }
        public ActionResult DeleteEmployee(EmpInfo emp)
        {
            flag = 3;
            List <EmpInfo> empInfo = new List <EmpInfo>();

            ManipulateEmployee(emp);
            return(RedirectToAction("SelectEmployee", "Employee"));
        }
        // GET: ContactUs
        public ActionResult Index(int empId)
        {
            EmpBusinessLayer objemp_BL = new EmpBusinessLayer();
            EmpInfo          empInfo   = objemp_BL.GetById(empId);

            ViewBag.LoginUser          = empInfo.Name;
            ViewData["EmpInformation"] = empInfo;
            return(View(empInfo));
        }
Beispiel #15
0
 //将移动或雇佣的员工放入特定办公室 + 确定部门领导者 + CEO技能发动
 public void SelectDep(OfficeControl office)
 {
     if (office.CurrentManager != null && SelectMode < 3)
     {
         office.CurrentManager.InfoDetail.TempDestroyStrategy();
         office.CurrentManager.CurrentOffice = null;
         office.CurrentManager.InfoDetail.Entity.FindWorkPos();
     }
     if (SelectMode == 1)
     {
         //还需要重新计算工资
         Salary += CurrentEmpInfo.CalcSalary();
         office.CurrentManager            = CurrentEmpInfo.emp;
         CurrentEmpInfo.emp.CurrentOffice = office;
         SetInfoPanel();
         CurrentEmpInfo.emp.InfoA.transform.parent = StandbyContent;
         office.SetOfficeStatus();
     }
     else if (SelectMode == 2)
     {
         if (CurrentEmpInfo == CurrentEmpInfo.emp.InfoB)
         {
             CurrentEmpInfo = CurrentEmpInfo.emp.InfoA;
         }
         CurrentEmpInfo.transform.parent = StandbyContent;
         ResetOldAssignment();
         CurrentEmpInfo.emp.CurrentOffice = office;
         office.CurrentManager            = CurrentEmpInfo.emp;
         office.SetOfficeStatus();
         CurrentEmpInfo.DetailInfo.Entity.FindWorkPos();
     }
     //确定部门领导者
     else if (SelectMode == 3)
     {
         if (CurrentDep.CommandingOffice != null)
         {
             CurrentDep.CommandingOffice.ControledDeps.Remove(CurrentDep);
             CurrentDep.CommandingOffice.CheckManage();
         }
         CurrentDep.CommandingOffice = office;
         CurrentDep.Text_Office.text = "由 " + office.Text_OfficeName.text + " 管理";
         office.ControledDeps.Add(CurrentDep);
         office.CheckManage();
     }
     //CEO技能
     else if (SelectMode == 6)
     {
         if (CEOSkillNum == 3)
         {
             office.Progress = 100;
             office.ActiveButton.interactable = true;
             office.Text_Progress.text        = "激活进度:" + office.Progress + "%";
         }
         CEOSkillConfirm();
     }
     DepSelectPanel.SetActive(false);
 }
Beispiel #16
0
        public ProfileView(EmpInfo empInfo, MainPage parent)
        {
            this.parent        = parent;
            this.empInfo       = empInfo;
            this.isUserPresent = true;

            InitializeComponent();
            FormGrid.DataContext = this.empInfo;
        }
Beispiel #17
0
 public void SetInfo(EmpInfo detail)
 {
     InfoDetail    = detail;
     detail.Entity = this;
     detail.GC.HourEvent.AddListener(TimePass);
     detail.GC.HourEvent.AddListener(detail.emp.EventCheck);
     BM = detail.GC.BM;
     FindWorkPos();
     Text_Name.text = detail.emp.Name;
 }
Beispiel #18
0
 private void deleteCurrentEmployee(object sender, RoutedEventArgs e)
 {
     if (CurrentEmployee == null)
     {
         return;
     }
     Connection.deleteData <EmpInfo>("emp_id", CurrentEmployee.emp_id);
     CurrentEmployee = null;
     InitializePaginaion();
 }
Beispiel #19
0
        public ActionResult EditEmployee(EmpInfo emp)
        {
            PragimDBEntities dbContext = new PragimDBEntities();

            dbContext.Entry(emp).State = System.Data.Entity.EntityState.Modified;

            dbContext.SaveChanges();

            return(RedirectToAction("Index"));
        }
Beispiel #20
0
 public void RefreshNewStrs()
 {
     if (GC.CurrentEmployees.Count > 0)
     {
         for (int i = 0; i < 3; i++)
         {
             EmpInfo e = GC.CurrentEmployees[Random.Range(0, GC.CurrentEmployees.Count)].InfoDetail;
             NewStrs[i].Str = e.StrategiesInfo[Random.Range(0, 3)].Str;
             NewStrs[i].UpdateUI();
             NewStrs[i].UseButton.interactable = true;
         }
         NewStrPanel.SetActive(true);
     }
 }
Beispiel #21
0
    //(Hire)招聘后信息转移
    void SetInfoPanel()
    {
        CurrentEmpInfo.HireButton.interactable = false;

        EmpInfo ED = Instantiate(EmpDetailPrefab, EmpDetailContent);

        CurrentEmpInfo.CopyStatus(ED);

        EmpInfo EI1 = Instantiate(EmpInfoPrefab, TotalEmpContent);

        CurrentEmpInfo.CopyStatus(EI1);

        EmpInfo EI2 = Instantiate(EmpInfoPrefab, TotalEmpContent);

        CurrentEmpInfo.CopyStatus(EI2);

        EI1.DetailInfo    = ED;
        EI2.DetailInfo    = ED;
        ED.emp.InfoA      = EI1;
        ED.emp.InfoB      = EI2;
        ED.emp.InfoDetail = ED;
        ED.emp.InitRelation();
        ED.SetSkillName();
        //创建员工实体
        ED.Entity = Instantiate(EmpEntityPrefab, BM.ExitPos.position, Quaternion.Euler(0, 0, 0), BM.EntityContent);
        ED.Entity.SetInfo(ED);

        //注意应放在初始化人际关系后再添加至链表
        CurrentEmployees.Add(CurrentEmpInfo.emp);
        //复制特质
        for (int i = 0; i < CurrentEmpInfo.PerksInfo.Count; i++)
        {
            CurrentEmpInfo.PerksInfo[i].CurrentPerk.AddEffect();
            CurrentEmpInfo.PerksInfo[i].transform.parent = ED.PerkContent;
        }
        ED.PerksInfo = CurrentEmpInfo.PerksInfo;
        //复制能力
        for (int i = 0; i < CurrentEmpInfo.SkillsInfo.Count; i++)
        {
            CurrentEmpInfo.SkillsInfo[i].transform.parent = ED.SkillContent;
        }
        ED.SkillsInfo = CurrentEmpInfo.SkillsInfo;
        //复制战略
        for (int i = 0; i < CurrentEmpInfo.StrategiesInfo.Count; i++)
        {
            CurrentEmpInfo.StrategiesInfo[i].transform.parent = ED.StrategyContent;
        }
        ED.StrategiesInfo = CurrentEmpInfo.StrategiesInfo;
    }
        public ActionResult SelectEmployee(EmpInfo emp)
        {
            List <EmpInfo> empInfo = new List <EmpInfo>();
            DataTable      dt      = new DataTable();

            try
            {
                using (SqlConnection con = new SqlConnection(connction))
                {
                    con.Open();
                    using (SqlCommand cmd = new SqlCommand("EMP_CURD", con))
                    {
                        cmd.CommandType = CommandType.StoredProcedure;
                        cmd.Parameters.AddWithValue("@Flag", 4);
                        cmd.Parameters.AddWithValue("@Emp_id", emp.EMP_ID);
                        cmd.Parameters.Add("@Result", SqlDbType.NVarChar, 200);
                        cmd.Parameters["@Result"].Direction = ParameterDirection.Output;
                        SqlDataAdapter dataAdapter = new SqlDataAdapter(cmd);
                        dataAdapter.Fill(dt);
                        DataSet ds = new DataSet();
                        ds.Tables.Add(dt);
                        ds.WriteXml(Server.MapPath("~/XML/" + "Employee.xml"));
                        foreach (DataRow row in dt.Rows)
                        {
                            empInfo.Add(new EmpInfo()
                            {
                                EMP_ID          = Convert.ToInt32(row["Emp_Id"]),
                                Emp_Code        = Convert.ToString(row["Emp_Code"]),
                                Emp_Name        = Convert.ToString(row["Emp_Name"]),
                                Emp_Phone       = Convert.ToString(row["Emp_Phone"]),
                                Emp_Gender      = Convert.ToString(row["Emp_Gender"]),
                                Emp_Email       = Convert.ToString(row["Emp_Email"]),
                                Emp_salary      = Convert.ToDouble(row["Emp_salary"]),
                                Emp_Address     = Convert.ToString(row["Emp_Address"]),
                                Emp_Department  = Convert.ToString(row["Emp_Department"]),
                                Emp_Designation = Convert.ToString(row["Emp_Designation"]),
                                Emp_Age         = Convert.ToInt32(row["Emp_Age"])
                            });
                        }
                    }
                }

                return(Json(empInfo));
            }
            catch (Exception ex)
            {
                return(View("Error"));
            }
        }
Beispiel #23
0
        private int reEmpId(string Emptbox)
        {
            int reID = 0;

            using (MMSProDBDataContext dc = new MMSProDBDataContext(ConfigurationManager.ConnectionStrings["mmsConString"].ConnectionString))
            {
                EmpInfo ei = dc.EmpInfo.SingleOrDefault(u => u.Account == Emptbox);
                if (ei == null)
                {
                    return(0);
                }
                reID = ei.EmpID;
            }
            return(reID);
        }
        private int reEmpId(string Emp)
        {
            int valueEmp = 0;

            using (MMSProDBDataContext dc = new MMSProDBDataContext(ConfigurationManager.ConnectionStrings["mmsConString"].ConnectionString))
            {
                EmpInfo EI = dc.EmpInfo.SingleOrDefault(u => u.Account == Emp);
                if (EI != null)
                {
                    valueEmp = EI.EmpID;
                }
            }

            return(valueEmp);
        }
Beispiel #25
0
        public ActionResult EmpEdit(int BId)
        {
            EmpInfo b = new EmpInfo();

            b.emp_id = BId;
            // b.sear
            admindb.GetEmployeeInfoByEmpid(b);
            string all = null;

            if (b.emp_id != 0)
            {
                all = b.emp_name + "," + b.emp_name + "," + b.pay_commission + "," + b.date_of_next_increment + "," + b.designation + "," + b.dept_name + "," + b.category + "," + b.date_of_birth + "," + b.date_of_joining + "," + b.date_of_next_increment + "," + b.division + "," + b.pay_commission + "," + b.status_to_date + "," + b.personal_pay_allowance;
            }
            return(Json(all, JsonRequestBehavior.AllowGet));
        }
Beispiel #26
0
    //将移动或雇佣的员工放入特定部门 + 选择部门发动建筑特效 + CEO技能发动
    public void SelectDep(DepControl depControl)
    {
        if (SelectMode == 1)
        {
            //还需要重新计算工资
            Salary += CurrentEmpInfo.CalcSalary();
            depControl.CurrentEmps.Add(CurrentEmpInfo.emp);
            depControl.UpdateUI();
            CurrentEmpInfo.emp.CurrentDep = depControl;
            SetInfoPanel();
            CurrentEmpInfo.emp.InfoA.transform.parent = depControl.EmpContent;
        }
        else if (SelectMode == 2)
        {
            if (CurrentEmpInfo == CurrentEmpInfo.emp.InfoB)
            {
                CurrentEmpInfo = CurrentEmpInfo.emp.InfoA;
            }
            CurrentEmpInfo.transform.parent = depControl.EmpContent;

            ResetOldAssignment();
            //修改新部门生产力显示
            CurrentEmpInfo.emp.CurrentDep = depControl;
            depControl.CurrentEmps.Add(CurrentEmpInfo.emp);
            depControl.UpdateUI();
            CurrentEmpInfo.DetailInfo.Entity.FindWorkPos();
        }
        //选择部门发动建筑特效
        else if (SelectMode == 5)
        {
            CurrentDep = depControl;
            CurrentOffice.BuildingActive();
        }
        //CEO技能
        else if (SelectMode == 6)
        {
            if (CEOSkillNum == 1)
            {
                new ProduceBuff(0.2f, depControl, 16);
            }
            else if (CEOSkillNum == 2)
            {
                depControl.SpTime += 16;
            }
            CEOSkillConfirm();
        }
        DepSelectPanel.SetActive(false);
    }
Beispiel #27
0
    public override void StartEffect()
    {
        base.StartEffect();
        int     max = TargetEmp.CurrentDep.CurrentEmps.Count;
        EmpInfo Target1, Target2 = null;

        if (max == 1)
        {
            Target1 = TargetEmp.CurrentDep.CurrentEmps[0].InfoDetail;
        }
        else if (max == 2)
        {
            Target1 = TargetEmp.CurrentDep.CurrentEmps[0].InfoDetail;
            Target2 = TargetEmp.CurrentDep.CurrentEmps[1].InfoDetail;
        }
        else
        {
            int Random1 = Random.Range(0, max);
            int Random2 = Random.Range(0, max);
            while (Random1 == Random2)
            {
                Random2 = Random.Range(0, max);
            }
            Target1 = TargetEmp.CurrentDep.CurrentEmps[Random1].InfoDetail;
            Target2 = TargetEmp.CurrentDep.CurrentEmps[Random2].InfoDetail;
        }
        for (int i = 0; i < Target1.SkillsInfo.Count; i++)
        {
            Target1.SkillsInfo[i].skill.StaminaExtra += 20;
            if (Target1.SkillsInfo[i].skill.StaminaCost < Target1.SkillsInfo[i].skill.StaminaExtra)
            {
                Target1.SkillsInfo[i].skill.StaminaExtra = Target1.SkillsInfo[i].skill.StaminaCost;
            }
        }
        if (Target2 != null)
        {
            for (int i = 0; i < Target2.SkillsInfo.Count; i++)
            {
                Target2.SkillsInfo[i].skill.StaminaExtra += 20;
                if (Target2.SkillsInfo[i].skill.StaminaCost < Target2.SkillsInfo[i].skill.StaminaExtra)
                {
                    Target2.SkillsInfo[i].skill.StaminaExtra = Target2.SkillsInfo[i].skill.StaminaCost;
                }
            }
        }
    }
Beispiel #28
0
        public List <EmpInfo> GetEmps()
        {
            List <EmpInfo> items = new List <EmpInfo>();

            using (SqlDataReader dr = SqlHelper.ExecuteReader(Global.EmpConnectionString, "[dbo].[spGetEmps]"))
            {
                while (dr.Read())
                {
                    EmpInfo item = new EmpInfo();

                    getItem(dr, item);
                    items.Add(item);
                }

                return(items);
            }
        }
Beispiel #29
0
    public static EmpInfo HeadEmployee_byUnitCode(PISContext pis, string sUnitCode)
    {
        EmpInfo emp           = new EmpInfo();
        string  sPositionCode = HeadPostionCode_byUnitCode(pis, sUnitCode);
        var     d             = pis.personel_info.FirstOrDefault(w => w.POSCODE == sPositionCode);

        if (d != null)
        {
            emp.CODE          = d.CODE;
            emp.NAME          = d.FNAME + " " + d.LNAME;
            emp.POSITION_CODE = d.POSCODE;
            var p = pis.position.FirstOrDefault(w => w.poscode == d.POSCODE);
            emp.POSITION_NAME = p != null ? p.t_name : d.POSNAME;
            emp.POSITION_ABBR = p != null ? p.AB_NAME : d.POSNAME;
        }
        return(emp);
    }
Beispiel #30
0
 public void CopyStatus(EmpInfo ei)
 {
     ei.GC  = GC;
     ei.emp = emp;
     if (emp.Type == EmpType.Tech)
     {
         ei.Text_Type.text = "技术";
     }
     else if (emp.Type == EmpType.Market)
     {
         ei.Text_Type.text = "市场";
     }
     else
     {
         ei.Text_Type.text = "运营";
     }
     ei.Text_Name.text = emp.Name;
 }