public void Init(MsgJson.Item item, string option, string qty, string cost, string extra) { m_Item = item; m_CodeText.text = item.product_code; m_DescriptionText.text = item.description; m_OptionText.text = option; m_QtyText.text = qty; m_CostText.text = "$" + cost; m_ExtraText.text = extra; }
public void Init(MsgJson.Item item) { m_Item = item; m_Description.text = item.description; //获得ItemCategory信息 WWWForm form = new WWWForm(); form.AddField("token", PlayerPrefs.GetString("token")); form.AddField("id", m_Item.id); //Debug.Log(m_Item.id); HttpManager.Instance.SendPostForm(ProjectConst.GetItemDisplayStage, form); }
public void Init(MsgJson.Item item) { m_Item = item; double discount = Convert.ToDouble(item.discount); double price = Convert.ToDouble(item.unit_price); double displayPrice = Math.Round(price * (100 - discount) / 100, 2); m_Id = item.id; m_Code.text = item.product_code; m_Description.text = item.description; m_Units.text = item.units; m_Price.text = "$" + displayPrice; m_Discount = item.discount; m_Category_id = item.category_id; }
public void Init(MsgJson.Item item, string qty) { m_Item = item; m_QtyText.text = qty; foreach (var v in ControlPlayer.Instance.m_ItemCategorys.category) { if (v.id == item.category_id) { m_CategroyText.text = v.des; break; } } m_DesText.text = item.description; m_TotalText.text = "$" + item.unit_price; }
public void Init(MsgJson.Item item, string qty) { m_Item = item; m_QtyInputField.placeholder.GetComponent <Text>().text = qty; }