Ejemplo n.º 1
0
        private void MySigBtn_Click(object sender, RibbonControlEventArgs e)
        {
            //get current user
            XLMain.Staff user    = XLMain.Staff.StaffFromUser(Environment.UserName);
            bool         success = XLDocument.AddSignature(user.username);

            if (success)
            {
                success = XLDocument.AddSignatureMetaData(user, user);
            }
        }
Ejemplo n.º 2
0
        private void HarboursideSign_Click(object sender, RibbonControlEventArgs e)
        {
            //get current user
            XLMain.Staff user = XLMain.Staff.StaffFromUser(Environment.UserName);
            bool         auth = AuthCheck(user);

            if (auth)
            {
                bool success = XLDocument.AddSignature("Harbourside");
                if (success)
                {
                    XLMain.Staff harb = new XLMain.Staff();
                    harb.username = "******";
                    harb.name     = "Harbourside LLP";
                    success       = XLDocument.AddSignatureMetaData(user, harb);
                }
            }
            else
            {
                MessageBox.Show("You do not have authority to use this feature");
            }
        }
Ejemplo n.º 3
0
        private void MLsignature_Click(object sender, RibbonControlEventArgs e)
        {
            //get current user
            XLMain.Staff user = XLMain.Staff.StaffFromUser(Environment.UserName);
            bool         auth = AuthCheck(user);

            if (auth)
            {
                bool success = XLDocument.AddSignature("MilstedLangdon");
                if (success)
                {
                    XLMain.Staff mL = new XLMain.Staff();
                    mL.username = "******";
                    mL.name     = "Milsted Langdon LLP";
                    success     = XLDocument.AddSignatureMetaData(user, mL);
                }
            }
            else
            {
                MessageBox.Show("You do not have authority to use this feature");
            }
        }
Ejemplo n.º 4
0
        private void StaffSig_Click(object sender, RibbonControlEventArgs e)
        {
            //get current user
            XLMain.Staff user = XLMain.Staff.StaffFromUser(Environment.UserName);
            bool         auth = AuthCheck(user);

            if (auth)
            {
                StaffForm myForm = new StaffForm();
                myForm.ShowDialog();
                XLMain.Staff contact = myForm.selectedContact;
                //get current user
                bool success = XLDocument.AddSignature(contact.username);
                if (success)
                {
                    success = XLDocument.AddSignatureMetaData(user, contact);
                }
            }
            else
            {
                MessageBox.Show("You do not have authority to use this feature");
            }
        }