예제 #1
0
        private void SpawnNonEquipmentItemView(int itemId, Transform parent)
        {
            InventoryItemView inventoryItemView  = LocalPlayer.Inventory.InventoryItemViewsCache[itemId][0];
            InventoryItemView inventoryItemView2 = UnityEngine.Object.Instantiate <InventoryItemView>(inventoryItemView);

            inventoryItemView2.transform.localScale = inventoryItemView.transform.lossyScale;
            inventoryItemView2.transform.parent     = parent;
            if (inventoryItemView._modelOffsetTr)
            {
                inventoryItemView2.transform.localPosition = inventoryItemView._modelOffsetTr.localPosition;
            }
            else
            {
                Vector3 position = parent.position;
                position.y += LocalPlayer.Inventory._inventoryGO.transform.InverseTransformPoint(inventoryItemView.transform.position).y;
                inventoryItemView2.transform.position = position;
            }
            inventoryItemView2.transform.rotation = base.transform.parent.rotation * Quaternion.Inverse(inventoryItemView.transform.rotation);
            inventoryItemView2.gameObject.layer   = base.transform.parent.gameObject.layer;
            inventoryItemView2.gameObject.SetActive(true);
            UnityEngine.Object.Destroy(inventoryItemView2.GetComponent <Collider>());
            VirtualCursorSnapNode component = inventoryItemView2.gameObject.GetComponent <VirtualCursorSnapNode>();

            if (component)
            {
                UnityEngine.Object.Destroy(component);
            }
            StoreInformation component2 = inventoryItemView2.gameObject.GetComponent <StoreInformation>();

            if (component2)
            {
                UnityEngine.Object.Destroy(component2);
            }
            UnityEngine.Object.Destroy(inventoryItemView2);
        }
        public IActionResult PutStoreInformation(long id, StoreInformation storeInformation)
        {
            if (id != storeInformation.Id)
            {
                return(BadRequest());
            }

            _context.Entry(storeInformation).State = EntityState.Modified;

            try
            {
                _context.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!StoreInformationExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
예제 #3
0
    public string Register(string userId, string guid, string name, string email, string gender, string sec_ques, string sec_ans, string dob, string mobile, string country, string city, string address, string datetime)
    {
        string          password = System.Web.Security.Membership.GeneratePassword(9, 1);
        Guid            user_guid;
        MembershipModel model = new MembershipModel();

        model.UserId       = userId;
        model.GuidId       = guid;
        model.Email        = email;
        model.Name         = name;
        model.Gender       = gender;
        model.SecurityQues = sec_ques;
        model.SecurityAns  = sec_ans;
        model.DOB          = dob;
        model.MobileNo     = mobile;
        model.Country      = country;
        model.City         = city;
        model.Address      = address;
        model.DateTime     = datetime;
        StoreInformation s   = new StoreInformation();
        string           msg = s.Register(model);

        if (msg.Contains(Constants.SUCCESS))
        {
            return(Constants.SUCCESS);
        }
        else
        {
            return(Constants.ERROR);
        }
        // model.UserId = user_id;
        //model.Password = password;
    }
예제 #4
0
        public bool InsertNewStoreInformation(StoreInformation storeInformation)
        {
            bool saved;

            try
            {
                if (storeInformation == null)
                {
                    saved = false;
                    throw new ArgumentNullException(nameof(storeInformation));
                }
                else
                {
                    _context.StoreInformation.Add(storeInformation);
                    saved = true;
                }
            }
            catch (Exception ex)
            {
                //log exception
                return(false);
            }

            return(saved);
        }
        public IActionResult UpdateStore(int storeID, [FromBody] StoreInformation storeItem)
        {
            try
            {
                SqlConnection conn = new SqlConnection(DBConnection.connectionString);
                SqlCommand    cmd  = new SqlCommand();

                cmd.Connection = conn;

                cmd.CommandText = "update Store " +
                                  "set Active = @trueFalse " +
                                  "where StoreID = @storeID;";

                cmd.Parameters.AddWithValue("@storeID", storeID);
                cmd.Parameters.AddWithValue("@trueFalse", storeItem.Active);

                conn.Open();

                DataTable dt = new DataTable();

                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    dt.Load(dr);



                    return(Ok("Store with ID [" + storeID + "] availability was changed!"));
                }
            }
            catch (SqlException sqlEx)
            {
                return(StatusCode((int)HttpStatusCode.InternalServerError, sqlEx));
            }
        }
예제 #6
0
        private void SpawnNonEquipment(int itemId, int slotId)
        {
            InventoryItemView inventoryItemView  = LocalPlayer.Inventory.InventoryItemViewsCache[itemId][0];
            InventoryItemView inventoryItemView2 = UnityEngine.Object.Instantiate <InventoryItemView>(inventoryItemView);
            Vector3           zero = Vector3.zero;

            zero.y += inventoryItemView.transform.position.y - LocalPlayer.Inventory._inventoryGO.transform.position.y;
            inventoryItemView2.transform.localScale    = inventoryItemView.transform.lossyScale;
            inventoryItemView2.transform.parent        = this._slots[slotId];
            inventoryItemView2.transform.localPosition = zero;
            inventoryItemView2.transform.localRotation = inventoryItemView.transform.localRotation * Quaternion.Euler(0f, 0f, 90f);
            inventoryItemView2.gameObject.layer        = base.gameObject.layer;
            UnityEngine.Object.DestroyImmediate(inventoryItemView2.GetComponent <Collider>());
            this.CleanUpComponents(inventoryItemView2.transform);
            inventoryItemView2.gameObject.SetActive(true);
            UnityEngine.Object.Destroy(inventoryItemView2.GetComponent <Collider>());
            VirtualCursorSnapNode component = inventoryItemView2.GetComponent <VirtualCursorSnapNode>();

            if (component)
            {
                UnityEngine.Object.Destroy(component);
            }
            StoreInformation component2 = inventoryItemView2.GetComponent <StoreInformation>();

            if (component2)
            {
                UnityEngine.Object.Destroy(component2);
            }
            UnityEngine.Object.Destroy(inventoryItemView2);
        }
예제 #7
0
    // Use this for initialization
    void Start()
    {
        storeInformation = GameObject.FindGameObjectWithTag("StoreInformation").GetComponent <StoreInformation>();
        if (SceneManager.GetActiveScene().name == "Scene1")
        {
            instantiatePoop = GameObject.FindGameObjectWithTag("MainScript").GetComponent <InstantiatePoop>();
        }


#if UNITY_ANDROID
        string appId = "ca-app-pub-7498255284251761~5601353189";
#elif UNITY_IPHONE
        string appId = "ca-app-pub-3940256099942544~1458002511";
#else
        string appId = "unexpected_platform";
#endif

        // Initialize the Google Mobile Ads SDK.
        MobileAds.Initialize(appId);
        this.rewardBasedVideo = RewardBasedVideoAd.Instance;
        // RewardBasedVideoAd is a singleton, so handlers should only be registered once.
        this.rewardBasedVideo.OnAdLoaded             += this.HandleRewardBasedVideoLoaded;
        this.rewardBasedVideo.OnAdFailedToLoad       += this.HandleRewardBasedVideoFailedToLoad;
        this.rewardBasedVideo.OnAdOpening            += this.HandleRewardBasedVideoOpened;
        this.rewardBasedVideo.OnAdStarted            += this.HandleRewardBasedVideoStarted;
        this.rewardBasedVideo.OnAdRewarded           += this.HandleRewardBasedVideoRewarded;
        this.rewardBasedVideo.OnAdClosed             += this.HandleRewardBasedVideoClosed;
        this.rewardBasedVideo.OnAdLeavingApplication += this.HandleRewardBasedVideoLeftApplication;

        this.RequestRewardBasedVideo();
    }
        public ActionResult <StoreInformation> PostStoreInformation(StoreInformation storeInformation)
        {
            _context.StoreInformation.Add(storeInformation);
            _context.SaveChanges();

            return(CreatedAtAction("GetStoreInformation", new { id = storeInformation.Id }, storeInformation));
        }
예제 #9
0
        public ActionResult DeleteStrore(int Id)
        {
            StoreInformation NewData = db.StoreInformation.Find(Id);

            db.StoreInformation.Remove(NewData);
            db.SaveChanges();
            return(RedirectToAction("StoreInformation"));
        }
 public POSDeviceInformation(StoreInformation storeInfo)
 {
     CompanyId          = storeInfo.CompanyId;
     StoreId            = storeInfo.StoreId;
     StoreName          = storeInfo.StoreName;
     CompanyName        = storeInfo.CompanyName;
     CompanyShorterName = storeInfo.CompanyShorterName;
 }
 public static StoreInfo Map(StoreInformation info) => new StoreInfo
 {
     Address1 = info.Add1,
     Address2 = info.Add2,
     City     = info.City,
     State    = info.State,
     Country  = info.Country,
     Zipcode  = info.ZipCode
 };
예제 #12
0
 // Use this for initialization
 void Start()
 {
     storeInformation = GameObject.FindGameObjectWithTag("StoreInformation").GetComponent <StoreInformation>();
     //mainScript = GameObject.FindGameObjectWithTag("MainGameObject").GetComponent<MainScript>();
     //Esto se hace para ver si se muestra como comprado o no en la tienda
     plunger = storeInformation.plunger;
     shower  = storeInformation.shower;
     mirrow  = storeInformation.mirrow;
     sink    = storeInformation.sink;
     tower   = storeInformation.tower;
 }
예제 #13
0
        public string GetSecurityCode(StoreInformation storeInfo)
        {
            if (storeInfo == null)
            {
                throw new Exception();
            }
            var storeInfoText = JsonHelper.ToJson(storeInfo);

            var certificateContent = DES.DESEncryptBase64WithKeyIVToMd5Base64(storeInfoText, ConstValues.DESKEY, ConstValues.DESKEY);

            return(certificateContent);
        }
예제 #14
0
        /// <summary>
        /// Gets a string representation of the recovery point details object
        /// </summary>
        /// <returns>A string represenation of the recovery point details object</returns>
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.AppendLine(string.Format(CultureInfo.InvariantCulture, "OperationId={0}", this.OperationId));
            sb.AppendLine(string.Format(CultureInfo.InvariantCulture, "BackupLocations={0}", String.Join(", ", this.BackupLocations)));
            sb.AppendLine(string.Format(CultureInfo.InvariantCulture, "UserInitiatedOperation={0}", this.UserInitiatedOperation));
            sb.AppendLine("StoreInformation:");
            sb.AppendLine(StoreInformation.ToString());

            return(sb.ToString());
        }
예제 #15
0
        private void SpawnNonEquipmentItemView()
        {
            InventoryItemView inventoryItemView  = LocalPlayer.Inventory.InventoryItemViewsCache[this._storedItemId][0];
            InventoryItemView inventoryItemView2 = UnityEngine.Object.Instantiate <InventoryItemView>(inventoryItemView);
            Vector3           position           = base.transform.position;
            Quaternion        rotation           = base.transform.rotation;
            Item          item = ItemDatabase.ItemById(this._storedItemId);
            RackPlacement placementOverride = this.GetPlacementOverride(item);

            if (placementOverride != null)
            {
                Vector3    zero     = Vector3.zero;
                Quaternion identity = Quaternion.identity;
                Vector3    one      = Vector3.one;
                placementOverride.ApplyTo(ref zero, ref identity, ref one);
                inventoryItemView2.transform.localScale     = one;
                inventoryItemView2.transform.parent         = base.transform;
                inventoryItemView2.transform.localPosition  = zero;
                inventoryItemView2.transform.localRotation  = identity;
                inventoryItemView2.transform.localPosition += WeaponRackSlot.GetJitterVector3(this._jitterPosition);
                inventoryItemView2.transform.localRotation  = Quaternion.Euler(WeaponRackSlot.GetJitterVector3(this._jitterRotation)) * inventoryItemView2.transform.localRotation;
            }
            else
            {
                Vector3 position2 = position;
                position2.y += inventoryItemView.transform.position.y - LocalPlayer.Inventory._inventoryGO.transform.position.y;
                inventoryItemView2.transform.localScale = inventoryItemView.transform.lossyScale;
                inventoryItemView2.transform.parent     = base.transform;
                inventoryItemView2.transform.position   = position2;
                inventoryItemView2.transform.rotation   = inventoryItemView.transform.rotation;
            }
            inventoryItemView2.gameObject.layer = base.gameObject.layer;
            inventoryItemView2.gameObject.SetActive(true);
            this._storedItemGO = inventoryItemView2.gameObject;
            UnityEngine.Object.Destroy(inventoryItemView2.GetComponent <Collider>());
            UnityEngine.Object.Destroy(inventoryItemView2);
            VirtualCursorSnapNode component = this._storedItemGO.GetComponent <VirtualCursorSnapNode>();

            if (component)
            {
                UnityEngine.Object.Destroy(component);
            }
            StoreInformation component2 = this._storedItemGO.GetComponent <StoreInformation>();

            if (component2)
            {
                UnityEngine.Object.Destroy(component2);
            }
            if (this.OnItemAdded != null)
            {
                this.OnItemAdded.Invoke(this._storedItemId);
            }
        }
예제 #16
0
        internal IntPtr ToNative(PinCollection pinCollection)
        {
            var nativeRestorePointDetails = new NativeBackupRestoreTypes.FABRIC_RESTORE_POINT_DETAILS
            {
                OperationId            = OperationId,
                BackupLocations        = NativeTypes.ToNativeStringList(pinCollection, BackupLocations),
                StoreInformation       = StoreInformation.ToNative(pinCollection),
                UserInitiatedOperation = NativeTypes.ToBOOLEAN(UserInitiatedOperation),
                Reserved = IntPtr.Zero,
            };

            return(pinCollection.AddBlittable(nativeRestorePointDetails));
        }
예제 #17
0
        public async Task <StoreInformation> UpdateStore(StoreInformation store)
        {
            var storeJson = new StringContent(JsonSerializer.Serialize(store), Encoding.UTF8, "application/json");
            var response  = await _httpClient.PutAsync($"api/StoreInformation/{store.Id}", storeJson);

            if (response.IsSuccessStatusCode)
            {
                return(await JsonSerializer.DeserializeAsync <StoreInformation>(await response.Content.ReadAsStreamAsync()));
            }

            return(null);
            //"api/StoreInformation/{id}"
        }
예제 #18
0
 private void Awake()
 {
     //los datos se almacenarán en el dispositivo al nombre de savedViniciusRunner.gd
     routeFile = Application.persistentDataPath + "/savedToiletPaperGoal.gd";
     if (storeInformation == null)
     {
         storeInformation = this;
         DontDestroyOnLoad(gameObject);
     }
     else if (storeInformation != this)
     {
         Destroy(gameObject);
     }
 }
예제 #19
0
 public ActionResult <StoreInformation> InsertStore([FromBody] StoreInformation store)
 {
     _TNSPRepo.InsertNewStoreInformation(store);
     if (_TNSPRepo.Save())
     {
         return(CreatedAtRoute("GetStoreInfo",
                               new { id = store.Id },
                               store));
     }
     else
     {
         return(StatusCode(500));
     }
 }
예제 #20
0
    public string Register_Post(string userid, string password, int passwordfailedattempt, string role, int issuperadmin, int isrejected)
    {
        UserModel model = new UserModel();

        model.UserId   = userid;
        model.Password = password;
        model.PasswordFailedAttempt = passwordfailedattempt;
        model.Role         = role;
        model.isSuperAdmin = issuperadmin;
        model.isRejected   = isrejected;
        StoreInformation s = new StoreInformation();

        s.Register_Success(model);
        return(Constants.SUCCESS);
    }
예제 #21
0
        public void getStoreInfo()
        {
            string accept      = "application/json";
            string contentType = "application/json";

            try
            {
                // Get Store Information
                StoreInformation storeInfo = this.storeInfoApi.StoreGet(accept, contentType);
                Debug.WriteLine(storeInfo);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StoreInformationApi.StoreGet: " + e.ToString());
            }
        }
예제 #22
0
        public IActionResult GetStore()
        {
            try
            {
                SqlConnection conn = new SqlConnection(DBConnection.connectionString);
                SqlCommand    cmd  = new SqlCommand();

                cmd.Connection = conn;

                cmd.CommandText = "select *" +
                                  "from Store";

                conn.Open();

                DataTable dt = new DataTable();

                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    dt.Load(dr);

                    List <StoreInformation> storeList = new List <StoreInformation>();

                    foreach (DataRow row in dt.Rows)
                    {
                        StoreInformation storeInfo = new StoreInformation();

                        storeInfo.StoreID    = Convert.ToInt32(row["StoreID"]);
                        storeInfo.Name       = Convert.ToString(row["Name"]);
                        storeInfo.Phone      = Convert.ToString(row["Phone"]);
                        storeInfo.Street     = Convert.ToString(row["Street"]);
                        storeInfo.City       = Convert.ToString(row["City"]);
                        storeInfo.CountryID  = Convert.ToInt32(row["CountryID"]);
                        storeInfo.Active     = Convert.ToBoolean(row["Active"]);
                        storeInfo.CreateDate = Convert.ToDateTime(row["CreateDate"]);
                        storeInfo.ModifyDate = Convert.ToDateTime(row["ModifyDate"]);

                        storeList.Add(storeInfo);
                    }

                    return(Ok(storeList));
                }
            }
            catch (SqlException sqlEx)
            {
                return(StatusCode((int)HttpStatusCode.InternalServerError, sqlEx));
            }
        }
예제 #23
0
        public async Task <StoreInformation> InsertNewStore(StoreInformation store)
        {
            var storeJson = new StringContent(JsonSerializer.Serialize(store), Encoding.UTF8, "application/json");
            var response  = await _httpClient.PostAsync("api/StoreInformation", storeJson);

            if (response.IsSuccessStatusCode)
            {
                return(JsonSerializer.Deserialize <StoreInformation>(response.Content.ReadAsStringAsync().Result,
                                                                     new JsonSerializerOptions
                {
                    PropertyNamingPolicy = JsonNamingPolicy.CamelCase
                }));
            }

            return(null);
            //"api/StoreInformation"
        }
예제 #24
0
        public ActionResult StoreInformation(int?Id)
        {
            StoreInformation NewData = new StoreInformation();

            ListData = db.StoreInformation;
            if (Id > 0)
            {
                NewData          = db.StoreInformation.Find(Id);
                NewData.ListData = ListData.ToList();
            }

            else
            {
                NewData.ListData = ListData.ToList();
            }

            return(View(NewData));
        }
예제 #25
0
        public ActionResult OrderC401(string Invoice, int OrderSum, string orderStatus)
        {
            Invoices         EditData            = db.Invoices.Find(Invoice);
            StoreInformation StoreInformation    = db.StoreInformation.Where(p => p.Status == true).FirstOrDefault();
            Receipts         ReceiptsInformation = db.Receipts.Where(p => p.IsEnabled == true).FirstOrDefault();

            EditData.Name          = StoreInformation.Name;
            EditData.Store         = StoreInformation.Store;
            EditData.InvoicePeriod = ReceiptsInformation.InvoicePeriod;
            EditData.InvoicesDate  = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            EditData.InvoicesTotal = Convert.ToString(OrderSum);
            EditData.Value         = StoreInformation.Value;

            EditData.orderStatus = orderStatus;

            EditData.Note   = null;
            EditData.Status = false;
            ReceiptsInformation.CurrentNum = ((Convert.ToInt32(ReceiptsInformation.CurrentNum)) + 1).ToString();
            db.SaveChanges();
            return(RedirectToAction("C401", "Invoice", new { InvoicesNum = Invoice }));
        }
예제 #26
0
        public ActionResult StoreInformation(StoreInformation Data)
        {
            IQueryable <StoreInformation> DemandData = db.StoreInformation
                                                       .Where(p => p.Store.Equals(Data.Store));
            bool hasElements = DemandData.AsQueryable().Any();

            if (hasElements)
            {
                StoreInformation EditData = db.StoreInformation.Find(Data.Id);
                EditData.Name         = Data.Name;
                EditData.Value        = Data.Value;
                EditData.Store        = Data.Store;
                EditData.StoreNumber  = Data.StoreNumber;
                EditData.StoreAddress = Data.StoreAddress;
                EditData.Status       = Data.Status;
                EditData.StoreCode    = Data.StoreCode;
                db.SaveChanges();
                ListData          = db.StoreInformation;
                EditData.ListData = ListData.ToList();
                return(View(EditData));
            }
            else
            {
                StoreInformation NewData = new StoreInformation();
                NewData.Name         = Data.Name;
                NewData.Value        = Data.Value;
                NewData.Store        = Data.Store;
                NewData.StoreNumber  = Data.StoreNumber;
                NewData.StoreAddress = Data.StoreAddress;
                NewData.StoreCode    = Data.StoreCode;
                NewData.Status       = false;
                db.StoreInformation.Add(NewData);
                db.SaveChanges();
                ListData         = db.StoreInformation;
                NewData.ListData = ListData.ToList();
                return(View(NewData));
            }
        }
예제 #27
0
        public bool UpdateStoreInformation(StoreInformation storeInformation)
        {
            bool saved = false;

            try
            {
                if (storeInformation == null)
                {
                    saved = false;
                    throw new ArgumentNullException(nameof(storeInformation));
                }
                else
                {
                    _context.Update(storeInformation);
                }
            }
            catch (Exception ex)
            {
                //log exception
                return(false);
            }

            return(saved);
        }
예제 #28
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string url = Request.Url.ToString();
        ArrayList list = new ArrayList();
        string str = string.Empty;

        if (Request.HttpMethod == "GET")
        {
            if (url.IndexOf("status") != -1)
            {
                string query = Request.QueryString["status"].ToString();
                if (query.ToUpper() == "ALL")
                {
                    DataSet ds = SqlHelper.GetStoreInformation();
                    int count = ds.Tables[0].Rows.Count;
                    for (int i = 0; i < count; i++)
                    {
                        StoreInformation store = new StoreInformation();
                        store.StoreNo = ds.Tables[0].Rows[i]["storeNo"].ToString();
                        store.StoreRegion = ds.Tables[0].Rows[i]["storeRegion"].ToString();
                        store.StoreType = ds.Tables[0].Rows[i]["storeType"].ToString();
                        store.PrinterIP = ds.Tables[0].Rows[i]["printerIP"].ToString();
                        store.RouterIP = ds.Tables[0].Rows[i]["routerIP"].ToString();
                        store.LaptopIP1 = ds.Tables[0].Rows[i]["laptopIP1"].ToString();
                        store.LaptopIP2 = ds.Tables[0].Rows[i]["laptopIP2"].ToString();
                        store.FingerIP = ds.Tables[0].Rows[i]["fingerIP"].ToString();
                        store.FlowIP = ds.Tables[0].Rows[i]["flowIP"].ToString();
                        store.EmailAddress = ds.Tables[0].Rows[i]["emailAddress"].ToString();
                        store.PrinterType = ds.Tables[0].Rows[i]["printerType"].ToString();
                        store.TonerType = ds.Tables[0].Rows[i]["tonerType"].ToString();
                        store.RouterType = ds.Tables[0].Rows[i]["routerType"].ToString();

                        list.Add(store);
                    }
                }
                else if (query.ToUpper() == "SYNC")
                {
                    SqlHelper.SyncStoreInformation();
                    Response.Write("同步成功!");
                    Response.End();
                    return;
                }
            }
            else
            {
                Response.Write("This is Iwooo Monitor System");
                Response.End();
                return;
            }
        }
        else if(Request.HttpMethod == "POST")
        {
            StoreInformation store = new StoreInformation();
            string oper = Request.Form["oper"].ToString();

            if (oper == "edit")
            {
                store.StoreNo = Request.Form["StoreNo"].ToString();
                store.PrinterIP = Request.Form["PrinterIP"].ToString();
                store.RouterIP = Request.Form["RouterIP"].ToString();
                store.LaptopIP1 = Request.Form["LaptopIP1"].ToString();
                store.LaptopIP2 = Request.Form["LaptopIP2"].ToString();
                store.FingerIP = Request.Form["FingerIP"].ToString();
                store.FlowIP = Request.Form["FlowIP"].ToString();
                store.EmailAddress = Request.Form["EmailAddress"].ToString();
                store.PrinterType = Request.Form["PrinterType"].ToString();
                store.TonerType = Request.Form["TonerType"].ToString();
                store.RouterType = Request.Form["RouterType"].ToString();
                SqlHelper.UpdateStoreInformation(store);
            }
            else if (oper == "del")
            {
                string storeNo = Request.Form["name"].ToString();
                SqlHelper.DeleteStoreInformation(storeNo);
            }
        }

        JavaScriptSerializer json = new JavaScriptSerializer();
        str = json.Serialize(list);

        Response.Write(str);
        Response.End();
        return;
    }
예제 #29
0
 // Use this for initialization
 void Start()
 {
     instantiatePoop  = GameObject.FindGameObjectWithTag("MainScript").GetComponent <InstantiatePoop>();
     instantiateCoins = GameObject.FindGameObjectWithTag("MainScript").GetComponent <Coins>();
     storeInformation = GameObject.FindGameObjectWithTag("StoreInformation").GetComponent <StoreInformation>();
 }
예제 #30
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string    url  = Request.Url.ToString();
        ArrayList list = new ArrayList();
        string    str  = string.Empty;

        if (Request.HttpMethod == "GET")
        {
            if (url.IndexOf("status") != -1)
            {
                string query = Request.QueryString["status"].ToString();
                if (query.ToUpper() == "ALL")
                {
                    DataSet ds    = SqlHelper.GetStoreInformation();
                    int     count = ds.Tables[0].Rows.Count;
                    for (int i = 0; i < count; i++)
                    {
                        StoreInformation store = new StoreInformation();
                        store.StoreNo      = ds.Tables[0].Rows[i]["storeNo"].ToString();
                        store.StoreRegion  = ds.Tables[0].Rows[i]["storeRegion"].ToString();
                        store.StoreType    = ds.Tables[0].Rows[i]["storeType"].ToString();
                        store.PrinterIP    = ds.Tables[0].Rows[i]["printerIP"].ToString();
                        store.RouterIP     = ds.Tables[0].Rows[i]["routerIP"].ToString();
                        store.LaptopIP1    = ds.Tables[0].Rows[i]["laptopIP1"].ToString();
                        store.LaptopIP2    = ds.Tables[0].Rows[i]["laptopIP2"].ToString();
                        store.FingerIP     = ds.Tables[0].Rows[i]["fingerIP"].ToString();
                        store.FlowIP       = ds.Tables[0].Rows[i]["flowIP"].ToString();
                        store.EmailAddress = ds.Tables[0].Rows[i]["emailAddress"].ToString();
                        store.PrinterType  = ds.Tables[0].Rows[i]["printerType"].ToString();
                        store.TonerType    = ds.Tables[0].Rows[i]["tonerType"].ToString();
                        store.RouterType   = ds.Tables[0].Rows[i]["routerType"].ToString();

                        list.Add(store);
                    }
                }
                else if (query.ToUpper() == "SYNC")
                {
                    SqlHelper.SyncStoreInformation();
                    Response.Write("同步成功!");
                    Response.End();
                    return;
                }
            }
            else
            {
                Response.Write("This is Iwooo Monitor System");
                Response.End();
                return;
            }
        }
        else if (Request.HttpMethod == "POST")
        {
            StoreInformation store = new StoreInformation();
            string           oper  = Request.Form["oper"].ToString();

            if (oper == "edit")
            {
                store.StoreNo      = Request.Form["StoreNo"].ToString();
                store.PrinterIP    = Request.Form["PrinterIP"].ToString();
                store.RouterIP     = Request.Form["RouterIP"].ToString();
                store.LaptopIP1    = Request.Form["LaptopIP1"].ToString();
                store.LaptopIP2    = Request.Form["LaptopIP2"].ToString();
                store.FingerIP     = Request.Form["FingerIP"].ToString();
                store.FlowIP       = Request.Form["FlowIP"].ToString();
                store.EmailAddress = Request.Form["EmailAddress"].ToString();
                store.PrinterType  = Request.Form["PrinterType"].ToString();
                store.TonerType    = Request.Form["TonerType"].ToString();
                store.RouterType   = Request.Form["RouterType"].ToString();
                SqlHelper.UpdateStoreInformation(store);
            }
            else if (oper == "del")
            {
                string storeNo = Request.Form["name"].ToString();
                SqlHelper.DeleteStoreInformation(storeNo);
            }
        }

        JavaScriptSerializer json = new JavaScriptSerializer();

        str = json.Serialize(list);

        Response.Write(str);
        Response.End();
        return;
    }
예제 #31
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string    url  = Request.Url.ToString();
        ArrayList list = new ArrayList();
        string    str  = string.Empty;

        if (Request.HttpMethod == "GET")
        {
            if (url.IndexOf("status") != -1)
            {
                string query  = Request.QueryString["status"].ToString();
                string search = url.IndexOf("_search") != -1 ? Request.QueryString["_search"].ToString() : "";

                if (query.ToUpper() == "ALL")
                {
                    DataSet ds = new DataSet();

                    if (search == "true")
                    {
                        string searchString = Request.QueryString["searchString"].ToString();

                        ds = SqlHelper.GetStoreInformation(searchString);
                        int count = ds.Tables[0].Rows.Count;
                        for (int i = 0; i < count; i++)
                        {
                            StoreInformation storeInfo = new StoreInformation();
                            storeInfo.StoreNo      = ds.Tables[0].Rows[i]["storeNo"].ToString();
                            storeInfo.StoreRegion  = ds.Tables[0].Rows[i]["storeRegion"].ToString();
                            storeInfo.StoreType    = ds.Tables[0].Rows[i]["storeType"].ToString();
                            storeInfo.EmailAddress = ds.Tables[0].Rows[i]["emailAddress"].ToString();
                            storeInfo.PrinterType  = ds.Tables[0].Rows[i]["printerType"].ToString();
                            storeInfo.TonerType    = ds.Tables[0].Rows[i]["tonerType"].ToString();
                            storeInfo.LaptopCount  = ds.Tables[0].Rows[i]["laptopCount"].ToString();
                            storeInfo.Disabled     = ds.Tables[0].Rows[i]["disabled"].ToString() == "False" ? "启用" : "禁用";
                            storeInfo.STime        = ds.Tables[0].Rows[i]["stime"].ToString();
                            storeInfo.ETime        = ds.Tables[0].Rows[i]["etime"].ToString();
                            storeInfo.Cycle        = ds.Tables[0].Rows[i]["cycle"].ToString();
                            storeInfo.DeviceID     = ds.Tables[0].Rows[i]["deviceID"].ToString();
                            storeInfo.DeviceName   = ds.Tables[0].Rows[i]["deviceName"].ToString();
                            storeInfo.IP           = ds.Tables[0].Rows[i]["IP"].ToString();

                            list.Add(storeInfo);
                        }
                    }
                }
            }
            else
            {
                Response.Write("This is Iwooo Monitor System");
                Response.End();
                return;
            }
        }
        else if (Request.HttpMethod == "POST")
        {
            string oper = Request.Form["oper"].ToString();

            if (oper == "edit")
            {
                string storeNo  = Request.Form["StoreNo"].ToString();
                string deviceID = Request.Form["DeviceID"].ToString();
                string ip       = Request.Form["IP"].ToString();
                string disabled = Request.Form["Disabled"].ToString();
                string stime    = Request.Form["STime"].ToString();
                string etime    = Request.Form["ETime"].ToString();
                string cycle    = Request.Form["Cycle"].ToString();

                SqlHelper.UpdateStoreInformation(storeNo, deviceID, ip, disabled, stime, etime, cycle);
            }
        }

        JavaScriptSerializer json = new JavaScriptSerializer();

        str = json.Serialize(list);

        Response.Write(str);
        Response.End();
        return;
    }