Exemplo n.º 1
0
        /// <summary>
        /// 加载机构详情
        /// </summary>
        /// <param name="workerDetail">机构详情</param>
        public void LoadWorkerDetail(BaseWorkesDetails workerDetail)
        {
            if (null == workerDetail)
            {
                workerDetail = InitBaseWorkeDetail;
            }

            CurrentWorkerDetail = workerDetail;
            frmWorkerForm.Load(workerDetail);
        }
Exemplo n.º 2
0
        public void LoadWorkerDetail(int iID)
        {
            BaseWorkesDetails workerDetail = null;

            if (iID != 0)
            {
                var retdata = InvokeWcfService(
                    "BaseProject.Service",
                    "WorkerController",
                    "GetWorkerDetails",
                    (request) =>
                {
                    request.AddData(iID);
                });

                workerDetail = retdata.GetData <BaseWorkesDetails>(0);
            }

            frmWorkers.LoadWorkerDetail(workerDetail);
        }
Exemplo n.º 3
0
        public string SaveWorkerAndDetail(BaseWorkers worker, BaseWorkesDetails workerDetail)
        {
            try
            {
                var retdata = InvokeWcfService(
                    "BaseProject.Service",
                    "WorkerController",
                    "SaveWorkerAndDetail",
                    (request) =>
                {
                    request.AddData(worker);
                    request.AddData(workerDetail);
                });

                var ret = retdata.GetData <string>(0);
                return(ret);
            }
            catch (Exception ex)
            {
                MessageBoxShowError(ex.Message);
            }

            return(string.Empty);
        }