コード例 #1
0
 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;
 }
コード例 #2
0
    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);
    }
コード例 #3
0
ファイル: ItemItemLogic.cs プロジェクト: sezzna/JB-Management
    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;
    }
コード例 #4
0
    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;
    }
コード例 #5
0
 public void Init(MsgJson.Item item, string qty)
 {
     m_Item = item;
     m_QtyInputField.placeholder.GetComponent <Text>().text = qty;
 }