/// <summary>
        /// Gets the device information.
        /// </summary>
        /// <returns></returns>
        /// <remarks>
        /// Sequence Diagram:<br/>
        ///     <img src="SequenceDiagrams/SD_PrintReleaseDevice.Browser.LogOn.GetDeviceInformation.jpg"/>
        /// </remarks>
        private DEVICE_INFO_TYPE GetDeviceInformation()
        {
            DEVICE_INFO_TYPE deviceInfo = null;

            try
            {
                CreateWS();
                string             generic           = "1.0.0.23";
                CONFIGURATION_TYPE configurationType = null;
                deviceSettingType = new DEVICE_SETTING_TYPE();
                SCREEN_INFO_TYPE[] screenInfoType = null;

                deviceInfo = _ws.GetDeviceSettings(ref generic, out deviceSettingType, out configurationType, out screenInfoType);

                string deviceAutoClear = System.Configuration.ConfigurationSettings.AppSettings["DeviceAutoClear"];
                if (deviceAutoClear.ToLower() == "off")
                {
                    PROPERTY_TYPE[] acSetting = new PROPERTY_TYPE[1];
                    acSetting[0]         = new PROPERTY_TYPE();
                    acSetting[0].sysname = "enableAutoClear";
                    acSetting[0].Value   = "false"; //or "false" // IF value is set to false, Device auto logout will be removed.
                    string OSASESSIONID = Request.Params["UISessionID"].ToString();
                    _ws.SetDeviceContext(OSASESSIONID, acSetting, ref OsaDirectManager.Core.g_WSDLGeneric);
                }
            }
            catch (Exception)
            {
            }
            return(deviceInfo);
        }
 public ActionResult Create(PROPERTY_TYPE collection)
 {
     try
     {
         // TODO: Add insert logic here
         if (ModelState.IsValid)
         {
             var model = new Project_TypeModel();
             int res   = model.Create(collection.CodeType, collection.Status);
             if (res > 0)
             {
                 return(RedirectToAction("Index"));
             }
             else
             {
                 ModelState.AddModelError("", "Thêm mới không thành công");
             }
         }
         return(View(collection));
     }
     catch
     {
         return(View());
     }
 }
Example #3
0
        /// <summary>
        /// Gets the device information.
        /// </summary>
        /// <returns></returns>
        /// <remarks>
        /// Sequence Diagram:<br/>
        ///     <img src="SequenceDiagrams/SD_PrintReleaseDevice.Browser.LogOn.GetDeviceInformation.jpg"/>
        /// </remarks>
        private DEVICE_INFO_TYPE GetDeviceInformation()
        {
            DEVICE_INFO_TYPE deviceInfo = null;

            try
            {
                CreateWS();
                string             generic           = "1.0.0.23";
                CONFIGURATION_TYPE configurationType = null;
                SCREEN_INFO_TYPE[] screenInfoType    = null;
                deviceInfo = _ws.GetDeviceSettings(ref generic, out deviceSettingType, out configurationType, out screenInfoType);

                PROPERTY_TYPE[] acSetting = new PROPERTY_TYPE[1];
                acSetting[0]         = new PROPERTY_TYPE();
                acSetting[0].sysname = "enableAutoClear";
                acSetting[0].Value   = "false"; //or "false"
                string OSASESSIONID = Request.Params["UISessionId"] as string;

                _ws.SetDeviceContext(OSASESSIONID, acSetting, ref OsaDirectManager.Core.g_WSDLGeneric);
            }
            catch (Exception)
            {
                isValidLicenceFile = true;
            }
            return(deviceInfo);
        }
Example #4
0
        /*Scoreを足し算する*/
        //public void AddScore(int rate, int addScore)
        //{
        //    SetScore(rate, GetScore(rate) + addScore);
        //}

        /*PROPERTYの値を取得*/
        public int GetNumOfProp(PROPERTY_TYPE property)
        {
            string line;
            int    num = -1;

            using (StreamReader theReader = new StreamReader(filename))
            {
                do
                {
                    line = theReader.ReadLine();

                    //特定値獲得
                    if (line == '#' + property.ToString())
                    {
                        num = int.Parse(theReader.ReadLine());
                        break;
                    }
                } while (theReader.Peek() >= 0);
            }

            //エラー
            if (num == -1)
            {
                AddUser();
                return(0);
                //Debug.Log("SaveLaodManager::GetScoreByID関数から特定値取得に失敗しました。");
            }
            return(num);
        }
Example #5
0
        public ActionResult createPropertyType()
        {
            //

            var nType = new PROPERTY_TYPE();

            return(View(nType));
        }
Example #6
0
        public ActionResult editPropertyType(PROPERTY_TYPE p)
        {
            var entity = db.PROPERTY_TYPE.Find(p.ID);

            entity.CodeType    = p.CodeType;
            entity.Description = p.Description;
            db.PROPERTY_TYPE.Add(entity);
            db.SaveChanges();
            return(View("Index"));
        }
Example #7
0
 public Property(Cell RelCell, string Name, Group newGroup, float[] Cost, float[] Rent, PROPERTY_TYPE PropertyType)
 {
     this.RelCell = RelCell;
     RelCell.setProperty(this);
     this.Name = Name;
     this.RelGroup = newGroup;
     newGroup.addProperty(this);
     this.Cost = Cost;
     this.Mortgage = Cost[0]/2;
     this.Rent = Rent;
     this.PropertyType = PropertyType;
     this.Owner = null;
     this.Buildings = 0;
 }
Example #8
0
        /*PROPERTYの値を設定*/
        public void SetNumOfProp(PROPERTY_TYPE property, int num)
        {
            string[] lines = System.IO.File.ReadAllLines(filename);

            for (int i = 0; i < lines.Length; ++i)
            {
                if (lines[i] == '#' + property.ToString())
                {
                    lines[i + 1] = num.ToString();
                    Debug.Log("属性の値設定成功");
                    break;
                }
            }

            System.IO.File.WriteAllLines(filename, lines);
        }
Example #9
0
        public ActionResult createPropertyType(PROPERTY_TYPE p)
        {
            var testcodetype    = db.PROPERTY_TYPE.Where(x => x.CodeType == p.CodeType);
            var testDescription = db.PROPERTY_TYPE.Where(x => x.Description == p.Description);

            p.Status = true;
            if (testcodetype.Count() == 0)
            {
                if (testDescription.Count() == 0)
                {
                    db.PROPERTY_TYPE.Add(p);
                    db.SaveChanges();
                    TempData["create"] = "Loại dự án mới đã được tạo thành công";
                    return(RedirectToAction("Index", "PropertyType"));
                }
            }
            ViewBag.mess = "Loại dự án bị trùng vui lòng nhập lại loại dự án";
            return(View());
        }
Example #10
0
        private DEVICE_INFO_TYPE GetDeviceInformation()
        {
            DEVICE_INFO_TYPE deviceInfo = null;

            try
            {
                CreateWS();
                PROPERTY_TYPE[] acSetting = new PROPERTY_TYPE[1];
                acSetting[0]         = new PROPERTY_TYPE();
                acSetting[0].sysname = "enableAutoClear";
                acSetting[0].Value   = "false"; //or "false"
                string OSASESSIONID = Request.Params["UISessionID"].ToString();

                _ws.SetDeviceContext(OSASESSIONID, acSetting, ref OsaDirectManager.Core.g_WSDLGeneric);
            }
            catch (Exception)
            {
            }
            return(deviceInfo);
        }
Example #11
0
 /*PROPERTYの値を足し算する*/
 public void AddNumOfProp(PROPERTY_TYPE property, int addNum)
 {
     SetNumOfProp(property, GetNumOfProp(property) + addNum);
 }
Example #12
0
        private static PROPERTY_TYPE _ToType(string type)
        {
            PROPERTY_TYPE pt = (PROPERTY_TYPE)Enum.Parse(typeof(PROPERTY_TYPE), type, true);

            return(pt);
        }
Example #13
0
        private void btnSearchCadastrNo_Click(object sender, EventArgs e)
        {
            if (txtCodeRegionZone.Text == "")
            {
                _errProvider.SetError(txtCodeRegionZone, "Kadastr zonası mütləq seçilməlidir");
            }
            _errProvider.SetError(txtCodeRegionZone, "");
            StringBuilder codePattern = new StringBuilder(txtCodeRegionZone.Text);

            if (txtCodeRegion.Text != "")
            {
                codePattern.Append(txtCodeRegion.Text);
            }
            else
            {
                codePattern.Append("__");
            }
            if (txtCodeMunicipality.Text != "")
            {
                codePattern.Append(txtCodeMunicipality.Text);
            }
            else
            {
                codePattern.Append("___");
            }
            if (txtCodeTerriturialUnit.Text != "")
            {
                codePattern.Append(txtCodeTerriturialUnit.Text);
            }
            else
            {
                codePattern.Append("__");
            }

            codePattern.Append(txtParcelCadastralNo.Text);
            codePattern.Append("%");
            string cadastralCode = codePattern.ToString();

            if (!string.IsNullOrEmpty(cadastralCode))
            {
                progressBarCadastreNo.Visible = true;
                if (!_workerSearchCadastreNo.IsBusy)
                {
                    WorkerArg arg = new WorkerArg();
                    arg.CadstralNo = cadastralCode;
                    arg.ArgType    = 0;

                    //  APP_USER user = cboUser.SelectedItem as APP_USER;
                    PROPERTY_TYPE type      = cboPropertyType.SelectedItem as PROPERTY_TYPE;
                    USING_FORM    usingForm = cboUsingForm.SelectedItem as USING_FORM;
                    LAND_CATEGORY category  = cboCategory.SelectedItem as LAND_CATEGORY;
                    OLD_DOCK_TYPE docType   = cboDocType.SelectedItem as OLD_DOCK_TYPE;



                    arg.id_user         = idUser;
                    arg.Id_PropertyType = type.ID_PROPERTY_TYPE;
                    arg.Id_UsingForm    = usingForm.ID_USING_FORM;
                    arg.Id_LandCategory = category.ID_LAND_CATEGORY;
                    arg.Id_OLDDOCTYPE   = docType.ID_OLD_DOCK_TYPE;

                    string argvalue = date1.Value.ToShortDateString();
                    string nowdate  = DateTime.Now.ToShortDateString();
                    if (argvalue == nowdate)
                    {
                        arg.date1 = null;
                    }
                    else
                    {
                        arg.date1 = date1.Value;
                    }

                    arg.date2           = date2.Value;
                    arg.MinFacticalArea = Convert.ToInt32(txtMinFacticalArea.Value);
                    arg.MaxFacticalArea = txtMaxFacticalArea.Value != 0 ? Convert.ToInt32(txtMaxFacticalArea.Text) : (int?)null;
                    if (txtMindocArea.Text != "")
                    {
                        arg.MinDocumentedArea = Convert.ToInt32(txtMindocArea.Text);
                    }
                    arg.MaxDocumentedArea = txtMaxdocArea.Value != 0 ? Convert.ToInt32(txtMaxdocArea.Text) : (int?)null;


                    arg.ParcelOwners = parcel_owner_list;



                    _workerSearchCadastreNo.RunWorkerAsync(arg);
                }
            }
            else
            {
                gridControl1.DataSource = new List <ParcelSearchResult>();
            }
        }
 public void SetValue(T newValue, PROPERTY_TYPE newType)
 {
     Value = newValue;
     type  = newType;
 }