Ejemplo n.º 1
0
        private void Btn_Insert_Click(object sender, RibbonControlEventArgs e)
        {
            if (this.mRepresentativeForm == null)
            {
                this.mRepresentativeForm = new RepresentativeForm();
            }
            this.mRepresentativeForm.CustomShowDialog();

            this.FocusMainDocument();
        }
Ejemplo n.º 2
0
        private void On_Btn_Login(object sender, RibbonControlEventArgs e)
        {
            DialogResult result = DialogResult.OK;

            result = mLoginForm.ShowDialog();
            if (result == DialogResult.OK)
            {
                ///Create the Default document
                Aplication_CreateDefault();

                AppsSettings.GetInstance().isLogin = true;
                Btn_ListSession.Enabled = true;

                ///Create form
                mSessionListForm    = new SessionList();
                mRepresentativeForm = new RepresentativeForm();
            }
        }
Ejemplo n.º 3
0
        private void noRepresentative()
        {
            var mc = new MyContext();
            RepresentativeForm rf;

            if (DatabaseController.representativeList.Count() <= 0)
            {
                rf = new RepresentativeForm();
                rf.ShowDialog();
                if (rf.representative != null)
                {
                    representative = rf.representative;
                    mc.representatives.Add(representative);
                    mc.SaveChanges();
                    DatabaseController.representativeList = DatabaseController.GetRepresentatives();
                }
            }
        }