コード例 #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.ReceptionMainLayout);
            myToolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.ReceptionMainToolbar);
            SetSupportActionBar(myToolbar);
            FindElements();
            SetCmbData();
            SetFonts();

            var          names   = CustomerBussines.GetAll().Select(q => q.Name).ToList();
            ArrayAdapter adapter = new ArrayAdapter <string>(this, Android.Resource.Layout.SimpleSpinnerItem, names);

            txtReceptionMainCustomerName.Adapter = adapter;


            var          names_   = ReceptionBussines.GetAll().Select(q => q.BankName).ToList();
            ArrayAdapter adapter_ = new ArrayAdapter <string>(this, Android.Resource.Layout.SimpleSpinnerItem, names_);

            txtReceptionMainBankName.Adapter = adapter_;


            cls = new ReceptionBussines();

            txtReceptionMainYear.Text   = Calendar.GetYearOfDateSh(cls.DateSh).ToString();
            txtReceptionMainMounth.Text = Calendar.GetMonthOfDateSh(cls.DateSh).ToString();
            txtReceptionMainDay.Text    = Calendar.GetDayOfDateSh(cls.DateSh).ToString();
            lblReceptionMainDateSh.Text = cls.DateSh;

            cmbSandouq.ItemSelected += CmbSandouq_ItemSelected;
            cmbBank.ItemSelected    += CmbBank_ItemSelected;
        }
コード例 #2
0
 private void BindList()
 {
     try
     {
         list = ReceptionBussines.GetAll();
         if (CurrentUser.User.Type != EnUserType.Manager)
             list = list.Where(q => q.UserGuid == CurrentUser.User.Guid).ToList();
         lstReception.Adapter = new ReceptionAdapter(this, list.OrderByDescending(q => q.CreateDate).ToList());
     }
     catch (Exception ex)
     {
         WebErrorLog.ErrorInstence.StartErrorLog(ex);
     }
 }