Example #1
0
        public void changeQuery(string query)
        {
            cookieVM model = JsonConvert.DeserializeObject <cookieVM>(getCookie("cookieModel"));

            model.title = query;
            SetCookie(JsonConvert.SerializeObject(model), "cookieModel");
        }
Example #2
0
        public void setCokieModel(string ostan, string city, string projectDate, string metrajfrom, string metrajTo, string darsad, string mablaghvarizFrom, string mablaghvarizTo, string mablaghGestFrom, string mablaghGestTo, string mablaghKollFrom, string mablaghKollTo)
        {
            cookieVM model = JsonConvert.DeserializeObject <cookieVM>(getCookie("token"));

            if (model.account_aype != null)
            {
                model.account_aype = model.account_aype.Trim(',');
            }
            metrajfrom = metrajfrom == null ? "0" : metrajfrom;
            metrajTo   = metrajTo == null ? "0" : metrajTo;
            string unit_Area = metrajfrom + "," + metrajTo;

            model.unit_Area = unit_Area;


            mablaghvarizFrom             = mablaghvarizFrom == null ? "0" : mablaghvarizFrom;
            mablaghvarizTo               = mablaghvarizTo == null ? "0" : mablaghvarizTo;
            model.initial_deposit_amount = mablaghvarizFrom + "," + mablaghvarizTo;



            mablaghGestFrom = mablaghGestFrom == null ? "0" : mablaghGestFrom;
            mablaghGestTo   = mablaghGestTo == null ? "0" : mablaghGestTo;
            model.amount_per_installment = mablaghGestFrom + "," + mablaghGestTo;



            mablaghKollFrom    = mablaghKollFrom == null ? "0" : mablaghKollFrom;
            mablaghKollTo      = mablaghKollTo == null ? "0" : mablaghKollTo;
            model.total_amount = mablaghvarizFrom + "," + mablaghvarizTo;
            model.city         = city;
            model.ostan        = ostan;
            model.project_process_percentage = darsad;

            SetCookie(JsonConvert.SerializeObject(model), "cookieModel");
        }