public string SaveEmpAndDetail(int workId, BaseEmployee emp, BaseEmployeeDetails empDetail)
        {
            try
            {
                var retdata = InvokeWcfService(
                    "BaseProject.Service",
                    "EmpController",
                    "SaveEmpAndDetail",
                    (request) =>
                {
                    request.AddData(workId);
                    request.AddData(emp);
                    request.AddData(empDetail);
                });

                var ret = retdata.GetData <string>(0);
                MessageBoxShowSimple("保存人员成功!");
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(string.Empty);
        }
Example #2
0
        /// <summary>
        /// 显示人员详情
        /// </summary>
        /// <param name="empDetail">人员详情</param>
        public void LoadEmpDetail(BaseEmployeeDetails empDetail)
        {
            if (null == empDetail)
            {
                empDetail = InitBaseEmpDetail;
            }

            CurrentEmpDetail = empDetail;
            frmEmpForm.Load(empDetail);
        }
        public void LoadEmpDetail(int empId)
        {
            BaseEmployeeDetails empdetail = null;

            if (empId != 0)
            {
                var retdata = InvokeWcfService(
                    "BaseProject.Service",
                    "EmpController",
                    "GetEmpDetail",
                    (request) =>
                {
                    request.AddData(empId);
                });
                empdetail = retdata.GetData <BaseEmployeeDetails>(0);
            }

            frmEmp.LoadEmpDetail(empdetail);
        }