Пример #1
0
        public void BindItem(vwOutletListViewModel item)
        {
            FISLabel.Text   = "FIS";
            TotalLabel.Text = "Total";
            HPLabel.Text    = "( HP )";

            FISSalesTarget.Text = item.getFISSales() + "/" + item.getFISTarget();
            FISPer.Text         = item.getFISPer() + "%";
            FISBal.Text         = "B: " + item.getFISBal();
            FISMr.Text          = "MR: " + item.getFISMr();
            FISMrPer.Text       = item.getFISMr() + "%";
            HPSalesTarget.Text  = item.getHPSales() + "/" + item.getHPTarget();
            HPPer.Text          = item.getHPPer() + "%";
            HPBal.Text          = "B: " + item.getHPBal();
            HPMr.Text           = "MR: " + item.getHPMr();
            HPMrPer.Text        = item.getHPMr() + "%";
        }
Пример #2
0
        public void BindItem(vwOutletListViewModel listItem, ViewGroup parent)
        {
            HPLabel.Text     = "( HP )";
            RemarkLabel.Text = "Remark:";

            CustomerName.Text = listItem.getCustomerName();

            if (listItem.getP01Code() != "")
            {
                Project01.Text = listItem.getP01Code();
                Project01.SetBackgroundColor(GetColorFromHexValue(listItem.getP01Color()));
                Project01.SetOnClickListener(this);
            }
            else
            {
                Project01.Text = "";
                Project01.SetBackgroundColor(Android.Graphics.Color.Transparent);
                Project01.SetOnClickListener(null);
            }

            if (listItem.getP02Code() != "")
            {
                Project02.Text = listItem.getP02Code();
                Project02.SetBackgroundColor(GetColorFromHexValue(listItem.getP02Color()));
                Project02.SetOnClickListener(this);
            }
            else
            {
                Project02.Text = "";
                Project02.SetBackgroundColor(Android.Graphics.Color.Transparent);
                Project02.SetOnClickListener(null);
            }

            if (listItem.getP03Code() != "")
            {
                Project03.Text = listItem.getP03Code();
                Project03.SetBackgroundColor(GetColorFromHexValue(listItem.getP03Color()));
                Project03.SetOnClickListener(this);
            }
            else
            {
                Project03.Text = "";
                Project03.SetBackgroundColor(Android.Graphics.Color.Transparent);
                Project03.SetOnClickListener(null);
            }

            CustomerID.Text     = listItem.getCustomerID();
            FISSalesTarget.Text = listItem.getFISSales() + "/" + listItem.getFISTarget();
            FISPer.Text         = listItem.getFISPer() + "%";
            FISBal.Text         = "B: " + listItem.getFISBal();
            FISMr.Text          = "MR: " + listItem.getFISMr();
            FISMrPer.Text       = listItem.getFISMr() + "%";
            HPSalesTarget.Text  = listItem.getHPSales() + "/" + listItem.getHPTarget();
            HPPer.Text          = listItem.getHPPer() + "%";
            HPBal.Text          = "B: " + listItem.getHPBal();
            HPMr.Text           = "MR: " + listItem.getHPMr();
            HPMrPer.Text        = listItem.getHPMr() + "%";
            Remark.Text         = listItem.getRemark();

            if (listItem.Selected)
            {
                Android.Graphics.Color bgColor = new Android.Graphics.Color(ContextCompat.GetColor(this.outletListFragment.Context, Resource.Color.color_light_grey_background));
                ListItemFrame.SetBackgroundColor(bgColor);
            }
            else
            {
                ListItemFrame.SetBackgroundColor(Android.Graphics.Color.White);
            }
        }