Esempio n. 1
0
        private void materialButton_details_Click(object sender, EventArgs e)
        {
            var details = new Customer.Details(this.id);
            var trance  = new CustomControls.Modal(details);

            trance.ShowDialog();
        }
Esempio n. 2
0
        private void materialButton1_Click(object sender, EventArgs e)
        {
            AddItems newitem = new AddItems();

            newitem.adddata += Newitem_savedata;
            var trans = new CustomControls.Modal(newitem);

            trans.ShowDialog();
        }
Esempio n. 3
0
        private void materialButton_edit_Click(object sender, EventArgs e)
        {
            EditItems edititem = new EditItems();

            edititem.loaddata(this.id);
            edititem.edit += Edititem_edit1;;;
            var trance = new CustomControls.Modal(edititem);

            trance.ShowDialog();
        }
        private void Login_Load(object sender, EventArgs e)
        {
            if (Properties.Settings.Default.isdatabasesetup == false)
            {
                new Setting.DatabaseSetup().ShowDialog();
            }
            if (Properties.Settings.Default.isdatabasesetup == false)
            {
                Application.Exit();
            }
            if (!Properties.Settings.Default.isuserregister)
            {
                var m     = new Setting.UserRegister();
                var trans = new CustomControls.Modal(m);

                trans.ShowDialog();
            }
            if (!Properties.Settings.Default.isuserregister)
            {
                MessageBox.Show("Please Register User first");
                this.Close();
            }

            var keyold = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("5D41402ABC4B2A76B9719D911017C592");

            if (keyold != null)
            {
                var key = Convert.ToDateTime((string)keyold.GetValue("upto"));
                if (key < DateTime.Now)
                {
                    var m     = new Setting.AddKey();
                    var trans = new CustomControls.Modal(m);


                    trans.ShowDialog();
                }
                key = Convert.ToDateTime((string)keyold.GetValue("upto"));
                if (key < DateTime.Now)
                {
                    MessageBox.Show("Your Key has expired");
                    this.Close();
                }
            }

            if (DB.Instance.admins.Count() <= 0)
            {
                new Setting.AdminSetup().ShowDialog();
            }

            if (DB.Instance.admins.Count() <= 0)
            {
                this.Close();
            }
        }
Esempio n. 5
0
        private void materialButton_edit_Click(object sender, EventArgs e)
        {


            var edititem = new PurchaseItems.Edit(id);
            edititem.loaddata(this.id);
            edititem.editdata += Edititem_editdata;
            var trance = new CustomControls.Modal(edititem);
            trance.ShowDialog();

        }
        public void initEdit()
        {
            var editstaff = new Staffs.StaffEdit(Staff.id);

            editstaff.edit += (_staff) =>
            {
                Staff = (_staff);
                this.update(Staff);
            };
            var trance = new CustomControls.Modal(editstaff);

            trance.ShowDialog();
        }