Exemplo n.º 1
0
        void ImportSetMasterForm_Loaded(object sender, RoutedEventArgs e)
        {
            #region 新增
            if (FormType == FormTypes.Browse)
            {
                this.IsEnabled = false;

            }
            #endregion

            if (FormType == FormTypes.New)
            {
                Master = new T_HR_IMPORTSETMASTER();
                Master.MASTERID = Guid.NewGuid().ToString();
                ///TODO:EDIT,现在是固定的T_HR_PENSIONDETAIL,可修改成LOOKUP再调用
                Master.ENTITYNAME = "员工社保记录";
                Master.ENTITYCODE = "T_HR_PENSIONDETAIL";
                BindData();
                RefreshUI(RefreshedTypes.ShowProgressBar);
                commonClient.GetEntityProNameByEnityNameAsync("T_HR_PENSIONDETAIL", "PENSIONDETAILID");
            }
            else
            {
                RefreshUI(RefreshedTypes.ShowProgressBar);
                client.GetImportSetMasterByIDAsync(importSetID);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 导入Excel的员工社保卡信息
 /// </summary>
 /// <param name="strPath">当前上传的Excel文件路径</param>
 /// <param name="strMsg">处理消息</param>
 //public void ImportPensionByImportExcel(string strPath, string employeeID, ref string strMsg)
 //{
 //    ImportSetMasterBLL bll = new ImportSetMasterBLL();
 //    T_HR_IMPORTSETMASTER master = bll.GetImportSetMasterByEntityCode("T_HR_PENSIONDETAIL", employeeID);
 //    ImportExcel penBll = new ImportExcel(strPath, 0, master, new T_HR_PENSIONDETAIL());
 //    penBll.StartImport();
 //}
 public void ImportPensionByImportExcel(string strPath, Dictionary <string, string> paras, ref string strMsg)
 {
     try
     {
         ImportSetMasterBLL   bll    = new ImportSetMasterBLL();
         T_HR_IMPORTSETMASTER master = bll.GetImportSetMasterByEntityCode("T_HR_PENSIONDETAIL", paras["CITY"], paras["OWNERCOMPANYID"]);
         if (master != null)
         {
             T_HR_PENSIONDETAIL dt     = new T_HR_PENSIONDETAIL();
             ImportExcel        penBll = new ImportExcel(strPath, 0, master, new T_HR_PENSIONDETAIL(), paras);
             bool sucess = penBll.StartImport();
             if (sucess)
             {
                 strMsg = "true";
             }
             else
             {
                 strMsg = "false";
             }
         }
         else
         {
             strMsg = "NOTFOUND";
         }
     }
     catch (Exception ex)
     {
         SMT.Foundation.Log.Tracer.Debug(System.DateTime.Now.ToString() + " ImportPensionByImportExcel:" + ex.Message);
     }
 }
Exemplo n.º 3
0
        public ImportExcel(string fileName, int workSheetIndex, T_HR_IMPORTSETMASTER importConfig, object entity, Dictionary<string, string> paras)
        {
            FileName = fileName;
            WorkSheetIndex = workSheetIndex;
            ImportConfig = importConfig;

            EntityInstance = entity;
            this.paras = paras;
        }
Exemplo n.º 4
0
 public void ImportSetMasterUpdate(T_HR_IMPORTSETMASTER entity, List<T_HR_IMPORTSETDETAIL> entList, ref string strMsg)
 {
     using (ImportSetMasterBLL bll = new ImportSetMasterBLL())
     {
         bll.ImportSetMasterUpdate(entity, entList, ref strMsg);
     }
 }
Exemplo n.º 5
0
 void client_GetImportSetMasterByIDCompleted(object sender, GetImportSetMasterByIDCompletedEventArgs e)
 {
     if (e.Error != null && e.Error.Message != "")
     {
         RefreshUI(RefreshedTypes.HideProgressBar);
         ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
     }
     else
     {
         if (e.Result != null)
         {
             Master = e.Result;
             BindData();
             client.GetImportSetDetailByMasterIDAsync(Master.MASTERID);
         }
     }
 }