Ejemplo n.º 1
0
        public Result <PatientInfo> PatientInfo(BaseParams search)
        {
            if (IsAuthrized)
            {
                String   searchUserID = search.to_user_id == null ? search.user_id : search.to_user_id;
                TPatient patient      = ((PatientService)UserService).GetPatientByGID(searchUserID);
                if (patient != null)
                {
                    PatientInfo info = new PatientInfo();
                    info.age           = patient.Age;
                    info.sex           = patient.Sex;
                    info.avatar        = ObjectUtils.GetValueOrEmpty(patient.Avatar);
                    info.contact_phone = ObjectUtils.GetValueOrEmpty(patient.ReservationPhone);
                    info.family_name   = ObjectUtils.GetValueOrEmpty(patient.FamilyName);
                    info.family_phone  = ObjectUtils.GetValueOrEmpty(patient.FamilyTelephone);
                    info.name          = ObjectUtils.GetValueOrEmpty(patient.PatientName);
                    info.address       = ObjectUtils.GetValueOrEmpty(patient.Address);
                    Result <PatientInfo> result = Result <PatientInfo> .CreateInstance(ResultCode.Success, "获取信息成功");

                    result.result_data = info;
                    return(result);
                }

                return(Result <PatientInfo> .CreateInstance(ResultCode.Fail, "没有对应患者信息"));
            }
            return(GetAuthFilterResult <PatientInfo>());
        }
Ejemplo n.º 2
0
    public void GenerateWindowsParams(BuildingParams buildingParams, BaseParams lastBaseParams)
    {
        windowParams = new List <WindowParams>();
        OpeningsGenerator openingsGenerator = new OpeningsGenerator();

        openingsGenerator.GenerateAtticOpenings(lastBaseParams, this, ref windowParams, buildingParams.rowSameLit);
    }
Ejemplo n.º 3
0
        public override void OnActionExecuting(System.Web.Http.Controllers.HttpActionContext actionContext)
        {
            Result <Object> result     = new Result <Object>();
            BaseController  controller = (BaseController)actionContext.ControllerContext.Controller;
            BaseParams      baseParams = GetBaseParams(actionContext);

            //设置游客账号为例外。
            if (guestUserID.Equals(baseParams.user_id) && guestUserToken.Equals(baseParams.token))
            {
                if (ControllerUtils.getErrorResult <Object>(actionContext.ModelState, baseParams) == null)
                {
                    controller.IsAuthrized = true;
                    return;
                }
            }
            result = tokenDAL.CheckDoctorModelState <Object>(baseParams, actionContext.ModelState);
            if (result == null)
            {
                controller.IsAuthrized = true;
            }
            else
            {
                controller.IsAuthrized      = false;
                controller.AuthFilterResult = result;
            }
        }
Ejemplo n.º 4
0
    /// <summary>
    /// repPosList_ItemDataBound
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void repPosList_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        try
        {
            if (e.Item.ItemIndex != -1)
            {
                Button btn1 = e.Item.FindControl("Button1") as Button;

                if (mCompany.RoleType == 2)
                {
                    if (BaseParams.getParams(baseParametersList).GongYingKongZhiFenXiao.Contains("|76|"))
                    {
                        btn1.Visible = true;
                        e.Item.FindControl("divclear").Visible = true;
                    }
                    e.Item.FindControl("divmake").Visible = true;
                }
                else if (mCompany.RoleType == 4 || mCompany.RoleType == 5)
                {
                    e.Item.FindControl("divshowpwd").Visible = true;
                }
            }
        }
        catch (Exception)
        {
        }
    }
Ejemplo n.º 5
0
    private void OnPreloadUpdate(object userData)
    {
        BaseParams args = userData as BaseParams;

        txtTip.text    = string.Format("正在加载资源{0:f0}%", args.FloatParam1);
        scrollbar.size = args.FloatParam1 * 0.01f;
    }
Ejemplo n.º 6
0
        public string GetUrlCopyMoveStatus(string taskId)
        {
            BaseParams baseParams = new BaseParams(_url + "entry.cgi", "SYNO.FileStation.CopyMove", "status", "3");

            return(baseParams.ToString() +
                   $"&taskid=\"{taskId}\"");
        }
Ejemplo n.º 7
0
        public string GetUrlRename(string path, string name)
        {
            BaseParams baseParams = new BaseParams(_url + "entry.cgi", "SYNO.FileStation.Rename", "rename", "2");

            return((baseParams.ToString() +
                    $"&path=\"{path}\"&name=\"{name}\"").Replace(@"\", string.Empty));
        }
Ejemplo n.º 8
0
        private void FillProperties(BaseParams newObject, IList <string> rowValues, IList <string> propertyOrder)
        {
            var properties = newObject.GetPropertiesToExport();

            foreach (PropertyInfo property in properties.Where(p => p.CanWrite))
            {
                ExportableAttribute attribute = property.GetCustomAttribute <ExportableAttribute>();
                int    index = propertyOrder.IndexOf(attribute.ElementName);
                string value = string.Empty;
                if (index < rowValues.Count)
                {
                    value = rowValues[index];
                }

                try
                {
                    property.SetValue(newObject,
                                      Convert.ChangeType(value, property.PropertyType, ImportExportSvc.USCulture), null);
                }
                catch (FormatException exception)
                {
                    newObject.AddValidationError(property.Name, $"Exception when parsing value from file: {exception.Message}");
                }
            }
        }
Ejemplo n.º 9
0
    public void requestGet <T>(string baseHttpUrl, BaseParams baseParams, HttpResponseHandler <T> responseHandler)
    {
        string httpUrl = baseHttpUrl + baseParams.dataToUrlStr();

        LogUtil.log("requestGet:" + httpUrl);
        StartCoroutine(SendGet(httpUrl, responseHandler));
    }
    private void OnCheckVersionDownloadUpdate(object param)
    {
        args = param as BaseParams;

        txtTip.text     = string.Format("正在下载{0}/{1}", args.IntParam1, args.IntParam2);
        scrollbar.value = (float)args.IntParam1 / args.IntParam2;
    }
Ejemplo n.º 11
0
        private void SetFormDataForExecuteTask(BaseParams @params, List <FileModel> files, List <KeyValuePair <string, string> > initialValues, MultipartFormDataContent postMultipartFormDataContent)
        {
            if (@params != null)
            {
                //Serializing and deserializing to get properties from derived class, since those properties only available in runtime.
                string json = JsonConvert.SerializeObject(@params, new KeyValuePairConverter());
                Dictionary <string, string> paramArray = JsonConvert.DeserializeObject <Dictionary <string, string> >(json);

                foreach (var paramKey in paramArray.Keys)
                {
                    initialValues.Add(new KeyValuePair <string, string>(paramKey, paramArray[paramKey]));
                }
            }

            for (int i = 0; i < files.Count; i++)
            {
                initialValues.Add(new KeyValuePair <string, string>(string.Format("files[{0}][filename]", i), files[i].FileName));
                initialValues.Add(new KeyValuePair <string, string>(string.Format("files[{0}][server_filename]", i), files[i].ServerFileName));
                initialValues.Add(new KeyValuePair <string, string>(string.Format("files[{0}][rotate]", i), ((int)files[i].Rotate).ToString()));
                initialValues.Add(new KeyValuePair <string, string>(string.Format("files[{0}][password]", i), files[i].Password));
            }

            var filteredFormDataValues = initialValues.Where(x => !string.IsNullOrWhiteSpace(x.Value));

            foreach (var formDataValues in filteredFormDataValues)
            {
                postMultipartFormDataContent.Add(new StringContent(formDataValues.Value),
                                                 string.Format("\"{0}\"", formDataValues.Key));
            }
        }
Ejemplo n.º 12
0
 public FrmSDS(BaseParams baseParams)
 {
     InitializeComponent();
     _baseParams      = baseParams;
     _sds             = new CalcSds(_baseParams);
     _sds.ChangePerc += val =>
     {
         if (InvokeRequired)
         {
             BeginInvoke(new Global.IntHandler(ChangePrBarVal), val);
         }
         else
         {
             ChangePrBarVal(val);
         }
     };
     _sds.ChangeText += val =>
     {
         if (InvokeRequired)
         {
             BeginInvoke(new Global.StrHandler(ChangeText), val);
         }
         else
         {
             ChangeText(val);
         }
     };
 }
Ejemplo n.º 13
0
    /// <summary>
    /// 保存
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void lbtnOK_Click(object sender, EventArgs e)
    {
        //接口账号集合
        string sql       = "";
        string setvalues = txtJKact517.Text + "^" + txtJKpwd517.Text + "^" + txtJKkey517.Text + "^" + txtyckack517.Text + "^" + txtyckpwd517.Text + "|" +
                           txtJKact51book.Text + "^" + txtJKpwd51book.Text + "^" + txtJKkey51book.Text + "^" + txtNoticeURL51book.Text + "|" +
                           txtJKactBT.Text + "^" + txtJKpwdBT.Text + "^" + txtJKkeyBT.Text + "|" +
                           txtJKactPM.Text + "^" + txtJKpwdPM.Text + "^" + txtJKkeyPM.Text + "|" +
                           txtJKactJR.Text + "^" + txtJKpwdJR.Text + "|" +
                           txtJKact8000yi.Text + "^" + txtJKpwd8000yi.Text + "^" + txtJKDKZFB8000yi.Text + "|" + txtyixing.Text + "^" + txtyixinggy.Text;

        sql = GetParameterUpSql(setvalues, mCompany.UninCode, PbProject.Model.definitionParam.paramsName.jieKouZhangHao);
        string msg = new PbProject.Logic.SQLEXBLL.SQLEXBLL_Base().ExecuteNonQuerySQLInfo(sql) == true ? "设置成功" : "设置失败";

        if (msg == "设置成功")
        {
            //日志
            Log_Operation logoper = new Log_Operation();
            logoper.ModuleName  = "接口账号设置";
            logoper.LoginName   = mUser.LoginName;
            logoper.UserName    = mUser.UserName;
            logoper.CreateTime  = Convert.ToDateTime(DateTime.Now);
            logoper.CpyNo       = mCompany.UninCode;
            logoper.OperateType = "接口账号设置";
            logoper.OptContent  = "修改前:" + BaseParams.getParams(baseParametersList).JieKouZhangHao + "//////////修改后:" + setvalues;
            new PbProject.Logic.Log.Log_OperationBLL().InsertLog_Operation(logoper);
        }

        ScriptManager.RegisterStartupScript(this, GetType(), "", "showdialog('" + msg + "');", true);
    }
Ejemplo n.º 14
0
        /// <summary>
        /// Loads CSV file contents and returns transaction criteria
        /// </summary>
        /// <param name="fileContents"></param>
        /// <returns></returns>
        public IEnumerable <BaseParams> LoadTransactions(string fileContents)
        {
            IList <BaseParams> transactions = new List <BaseParams>();
            IList <string>     lines        = fileContents
                                              .Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList();
            IList <string> propertyOrder        = lines[0].Split(',').ToList();
            int            transactionNameIndex = propertyOrder.IndexOf("Transaction_Name");

            IList <BaseParams> emptyObjects = GetEmptyParamObjects();

            foreach (string row in lines.Skip(1))
            {
                IList <string> rowValues       = row.Split(',').ToList();
                string         transactionName = rowValues[transactionNameIndex];

                var emptyObject = emptyObjects.SingleOrDefault(x => x.TransactionName == transactionName);
                if (emptyObject != null)
                {
                    BaseParams newObject = (BaseParams)Activator.CreateInstance(emptyObject.GetType());

                    FillProperties(newObject, rowValues, propertyOrder);
                    transactions.Add(newObject);
                }
            }
            return(transactions);
        }
Ejemplo n.º 15
0
        private static void SetFormDataForExecuteTask(BaseParams @params, IReadOnlyList <FileModel> files, List <KeyValuePair <string, string> > initialValues, MultipartFormDataContent postMultipartFormDataContent)
        {
            if (@params != null)
            {
                //Serializing and deserializing to get properties from derived class, since those properties only available in runtime.
                var json       = JsonConvert.SerializeObject(@params, new KeyValuePairConverter());
                var paramArray = JsonConvert.DeserializeObject <Dictionary <string, string> >(json);

                initialValues.AddRange(
                    paramArray.Keys.Select(
                        paramKey => new KeyValuePair <string, string>(paramKey, paramArray[paramKey])));
            }

            for (var i = 0; i < files.Count; i++)
            {
                initialValues.Add(new KeyValuePair <string, string>(StringHelpers.Invariant($"files[{i}][filename]"), files[i].FileName));
                initialValues.Add(new KeyValuePair <string, string>(StringHelpers.Invariant($"files[{i}][server_filename]"), files[i].ServerFileName));
                initialValues.Add(new KeyValuePair <string, string>(StringHelpers.Invariant($"files[{i}][rotate]"), ((int)files[i].Rotate).ToString(CultureInfo.InvariantCulture)));
                initialValues.Add(new KeyValuePair <string, string>(StringHelpers.Invariant($"files[{i}][password]"), files[i].Password));
            }

            var filteredFormDataValues = initialValues.Where(x => !string.IsNullOrWhiteSpace(x.Value));

            foreach (var formDataValues in filteredFormDataValues)
            {
                postMultipartFormDataContent.Add(new StringContent(formDataValues.Value),
                                                 StringHelpers.Invariant($"\"{formDataValues.Key}\""));
            }
        }
Ejemplo n.º 16
0
    void GenerateSegmentParams(BuildingParams buildingParams)
    {
        foundationParams = new FoundationParams(buildingParams);

        for (int i = 0; i < floorCount; i++)
        {
            if (i == 0)
            {
                baseParams[i] = new BaseParams(foundationParams.finalSize, buildingParams, GetOpeningStyle(buildingParams), GetOpeningStyle(buildingParams));
                baseParams[i].GenerateWindowsAndDoorParams(buildingParams);
            }
            else
            {
                //2 auktas nustato visu sekanciu aukstu langu isvaizda, pirmas aukstas turi savo
                baseParams[i] = new BaseParams(baseParams[i - 1].finalSize, buildingParams, i, i >= 2 ? baseParams[i - 1].windowStyle : GetOpeningStyle(buildingParams));
                if (i == 1)
                {
                    baseParams[i].GenerateWindowsParams(buildingParams);
                }
                else
                {
                    baseParams[i].GenerateWindowsParams(buildingParams, baseParams[i - 1].windowParams[0].finalSize);
                }
            }
        }

        atticParams = new AtticParams(baseParams[floorCount - 1].finalSize);
        atticParams.GenerateWindowsParams(buildingParams, baseParams[floorCount - 1]);

        roofParams    = new RoofParams(atticParams.finalSize, baseParams[floorCount - 1].finalSize);
        chimneyParams = new ChimneyParams(roofParams, baseParams[floorCount - 1]);
    }
Ejemplo n.º 17
0
        public string GetUrlCreateFolder(string folder_path, string name)
        {
            BaseParams baseParams = new BaseParams(_url + "entry.cgi", "SYNO.FileStation.CreateFolder", "create", "2");

            return(baseParams.ToString() +
                   $"&folder_path=\"{folder_path}\"&name=\"{name}\"");;
        }
Ejemplo n.º 18
0
    public void Test_BaseSizeRightFirewall()
    {
        BuildingParams buildingParams = new BuildingParams();

        buildingParams.leftFirewall  = false;
        buildingParams.rightFirewall = true;
        buildingParams.backFirewall  = false;

        Vector3    lastFloorSize = new Vector3(2.5f, 2f, 2f);
        BaseParams baseParams    = new BaseParams(lastFloorSize, buildingParams, 1, OpeningStyle.ARCH);
        Vector3    addTolastSize = new Vector3(1, 1, 1);

        Vector3 expextedMaxSize = lastFloorSize + new Vector3(addTolastSize.x / 2, addTolastSize.y, addTolastSize.z);
        Vector3 expextedMinSize = lastFloorSize;


        Vector3 size = baseParams.GetFinalSize(lastFloorSize, addTolastSize);

        Assert.That(size.x, Is.GreaterThanOrEqualTo(expextedMinSize.x));
        Assert.That(size.x, Is.LessThanOrEqualTo(expextedMaxSize.x));

        Assert.That(size.y, Is.GreaterThanOrEqualTo(expextedMinSize.y));
        Assert.That(size.y, Is.LessThanOrEqualTo(expextedMaxSize.y));

        Assert.That(size.z, Is.GreaterThanOrEqualTo(expextedMinSize.z));
        Assert.That(size.z, Is.LessThanOrEqualTo(expextedMaxSize.z));
    }
Ejemplo n.º 19
0
        /// <summary>
        /// 检查modelstat,参数是否验证成功,且token是否正确,如果正确返回null;
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="param"></param>
        /// <returns></returns>
        private Result <T> CheckModelState <T>(TokenType tokenType, BaseParams param, ModelStateDictionary modelState)
        {
            Result <T> result = ControllerUtils.getErrorResult <T>(modelState, param);

            if (result == null)
            {
                Boolean isOutDate = true;
                switch (tokenType)
                {
                case TokenType.Doctor:
                {
                    isOutDate = tokenService.IsDoctorTokenOutDate(param.user_id, param.token);
                }; break;

                case TokenType.Patient:
                {
                    isOutDate = tokenService.IsPatientTokenOutDate(param.user_id, param.token);
                }; break;
                }

                if (isOutDate)
                {
                    return(Result <T> .CreateInstance(ResultCode.TokenOutDate, "登录已过期,请重新登录。"));
                }
                else
                {
                    return(null);
                }
            }
            return(result);
        }
Ejemplo n.º 20
0
        public string GetUrlCompressStatus(string taskid)
        {
            BaseParams baseParams = new BaseParams(_url + "entry.cgi", "SYNO.FileStation.Compress", "status", "3");

            return(baseParams.ToString() +
                   $"&taskid={taskid}");
        }
Ejemplo n.º 21
0
        public string GetUrlDeleteStatus(string taskid)
        {
            BaseParams baseParams = new BaseParams(_url + "entry.cgi", "SYNO.FileStation.Delete", "status", "2");

            return(baseParams.ToString() +
                   $"&taskid=\"{taskid}\"");
        }
Ejemplo n.º 22
0
        /// <summary>
        /// date_expired должен обязательно в запросе обрамляться в кавычки
        /// </summary>
        /// <param name="path"></param>
        /// <param name="dateExpired">Срок действия ссылки: обязательно в формате yyyy-MM-dd</param>
        /// <returns></returns>
        public string GetUrlCreateShareLink(string path, DateTime?dateExpired = null)
        {
            BaseParams baseParams = new BaseParams(_url + "entry.cgi", "SYNO.FileStation.Sharing", "create", "3");

            return(baseParams.ToString() +
                   $"&path={path}" +
                   (dateExpired != null ? $"&date_expired=\"{dateExpired.Value.ToString( "yyyy-MM-dd HH:mm:ss" )}\"" : string.Empty));
        }
Ejemplo n.º 23
0
        public MyItemViewsHolder createViewsHolder(BaseParams _Params, int itemIndex)
        {
            var instance = new MyItemViewsHolder();

            instance.Init(itemPrefab, itemIndex);

            return(instance);
        }
Ejemplo n.º 24
0
    void CreateBase(Material material, BaseParams lastBaseParams, Transform parent)
    {
        Vector3Int baseObjSize = roofParams.baseObjSize;

        GenerateBaseCube(material, baseObjSize, name);
        obj.transform.parent = parent;
        AlterMesh(baseObjSize, lastBaseParams.finalSize);
    }
Ejemplo n.º 25
0
        /// <summary>
        /// Если deleteBlocking = true, то это блокирующее удаление, ответ не будет получен,
        /// пока не произойдет окончательное удаление
        /// Если deleteBlocking = false, то ответ придет сразу и там будет taskid и можно будет с помощью метода  DeleteStatus
        /// отследить состояние удаления
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        public string GetUrlDelete(string path,
                                   bool deleteBlocking)
        {
            BaseParams baseParams = new BaseParams(_url + "entry.cgi", "SYNO.FileStation.Delete", (deleteBlocking ? "delete" : "start"), "2");

            return(baseParams.ToString() +
                   $"&path=\"{path}\"");
        }
Ejemplo n.º 26
0
        /// <summary>
        /// Осуществить проверку организации по ИНН
        /// </summary>
        /// <param name="orgParams"></param>
        /// <returns></returns>
        public List <ContractorCheckResult> CheckOrganizationByInn(BaseParams orgParams)
        {
            var checkResults = new List <ContractorCheckResult>();

            checkResults.AddRange(CheckInBankService(orgParams.ExternalSystemCode, orgParams.Inn, "UL"));
            checkResults.Add(CheckInFedsfm(orgParams.Inn));
            return(checkResults);
        }
Ejemplo n.º 27
0
 /// <summary>  Конструктор </summary>
 /// <param name="countFloat"> Точность Значение (знаков после запятой)</param>
 public GRightValue(BaseParams param)
 {
     Panel               = new ViewPanel(param);
     PanelCurValue       = new ViewPanel(param);
     Panel.OnChangeRect += (rect) =>
     {
         PanelCurValue.SetRect(rect);
     };
 }
Ejemplo n.º 28
0
 public GCandles(BaseParams param)
 {
     Panel               = new ViewPanel(param);
     PanelLastCandle     = new ViewPanel(param);
     Panel.OnChangeRect += (rect) =>
     {
         PanelLastCandle.SetRect(rect);
     };
 }
Ejemplo n.º 29
0
    private void OnCheckVersionBeginDownloadUpdate(object userData)
    {
        BaseParams args = userData as BaseParams;

        txtTip.text = string.Format("正在下载{0}/{1}", args.IntParam1, args.IntParam2);

        txtSize.text   = string.Format("{0:f2}/{1:f2}M", (float)args.ULongParams1 / (1024 * 1024), (float)args.ULongParams2 / (1024 * 1024));
        scrollbar.size = (float)args.IntParam1 / args.IntParam2;
    }
Ejemplo n.º 30
0
        internal virtual T CallApi <T>(HttpMethod method, string url, BaseParams parameters, FileDescription file, Dictionary <string, string> extraHeaders = null) where T : BaseResult, new()
        {
            parameters?.Check();

            return(CallAndParse <T>(method,
                                    url,
                                    (method == HttpMethod.PUT || method == HttpMethod.POST) ? parameters?.ToParamsDictionary() : null,
                                    file,
                                    extraHeaders));
        }
Ejemplo n.º 31
0
        public bool Validate(BaseParams baseParams, out string message)
        {
            message = null;

            var extention = baseParams.Files["FileImport"].Extention;

            var fileExtentions = this.PossibleFileExtensions.Contains(",") ? this.PossibleFileExtensions.Split(',') : new[] { this.PossibleFileExtensions };
            if (fileExtentions.All(x => x != extention))
            {
                message = string.Format("Необходимо выбрать файл с допустимым расширением: {0}", this.PossibleFileExtensions);
                return false;
            }

            return true;
        }
Ejemplo n.º 32
0
        public override void SetUserParams(BaseParams baseParams)
        {
            dateStart = baseParams.Params["dateStart"].ToDateTime();
            year = dateStart.Year;
            dateEnd = baseParams.Params["dateEnd"].ToDateTime();

            var m = baseParams.Params["municipalityIds"].ToString();
            this.municipalityIds = !string.IsNullOrEmpty(m) ? m.Split(',').Select(x => x.ToInt()).ToArray() : new int[0];
        }
Ejemplo n.º 33
0
        ImportResult IGkhImport.Import(BaseParams baseParams)
        {
            this.culture = CultureInfo.CreateSpecificCulture("ru-RU");

            var file = baseParams.Files["FileImport"];

            this.InitLog(file.FileName);

            this.InitDictionaries();

            string message = string.Empty;

            this.InTransaction(() => { message = this.ProcessData(file.Data); });

            if (!string.IsNullOrEmpty(message))
            {
                return new ImportResult(StatusImport.CompletedWithError, message);
            }

            //this.InTransaction(this.SaveData);

            this.WriteLogs();

            // Намеренно закрываем текущую сессию, иначе при каждом коммите транзакции
            // ранее измененные дома вызывают каскадирование ФИАС
            this.Container.Resolve<ISessionProvider>().CloseCurrentSession();

            this.LogManager.Add(file, this.logImport);
            this.LogManager.Save();

            message += this.LogManager.GetInfo();
            var status = this.LogManager.CountError > 0 ? StatusImport.CompletedWithError : (this.LogManager.CountWarning > 0 ? StatusImport.CompletedWithWarning : StatusImport.CompletedWithoutError);
            return new ImportResult(status, message, string.Empty, this.LogManager.LogFileId);
        }
Ejemplo n.º 34
0
        public override void SetUserParams(BaseParams baseParams)
        {
            this.programCrId = baseParams.Params["programCrId"].ToInt();

            var municipalityIdsList = baseParams.Params.ContainsKey("municipalityIds")
                                  ? baseParams.Params["municipalityIds"].ToString()
                                  : string.Empty;

            this.municipalityIds = !string.IsNullOrEmpty(municipalityIdsList) ? municipalityIdsList.Split(',').Select(id => id.ToInt()).ToArray() : new int[0];

            var finSourceIdsList = baseParams.Params.ContainsKey("finSourceIds")
                      ? baseParams.Params["finSourceIds"].ToString()
                      : string.Empty;

            this.finSourceIds = !string.IsNullOrEmpty(finSourceIdsList) ? finSourceIdsList.Split(',').Select(id => id.ToInt()).ToArray() : new int[0];
        }