Esempio n. 1
0
        void Rl_Click(object sender, EventArgs e)
        {
            RelativeLayout rlValue = (RelativeLayout)sender;
            TextView       tvValue = (TextView)rlValue.GetChildAt(0);

            int IDdrug = (int)rlValue.GetTag(Resource.String.IDdrug);
            int IDinfo = (int)rlValue.GetTag(Resource.String.IDinfo);

//			string message = string.Format(@"Click to IDdrug:{0}, IDinfo:{0}", IDdrug, IDinfo);

//			Toast.MakeText(Activity,  message, ToastLength.Short).Show();

            string value = AttendanceResultManager.GetResultValue(newAttendanceResults, IDinfo, IDdrug);

            value = AttendanceResult.InvertStringBool(value);

            AttendanceResultManager.SetResultValue(newAttendanceResults, IDinfo, IDdrug, value);

            if (string.IsNullOrEmpty(value) || value.Equals(@"N"))
            {
                tvValue.SetTextAppearance(Activity, Resource.Style.text_danger);
                rlValue.SetBackgroundColor(Android.Graphics.Color.LightPink);
            }
            else
            {
                tvValue.SetTextAppearance(Activity, Resource.Style.text_success);
                rlValue.SetBackgroundColor(Android.Graphics.Color.LightGreen);
            }
            tvValue.Text = AttendanceResult.StringBoolToRussian(value);
            AttendanceResultManager.SetCurrentAttendanceResults(newAttendanceResults);
        }
Esempio n. 2
0
        void DecimalValue_AfterTextChanged(object sender, Android.Text.AfterTextChangedEventArgs e)
        {
            EditText       evValue = (EditText)sender;
            RelativeLayout rlValue = (RelativeLayout)evValue.Parent;
            int            IDdrug  = (int)rlValue.GetTag(Resource.String.IDdrug);
            int            IDinfo  = (int)rlValue.GetTag(Resource.String.IDinfo);

            AttendanceResultManager.SetResultValue(newAttendanceResults, IDinfo, IDdrug, e.Editable.ToString());
        }