Esempio n. 1
0
        private void fmTestForm_Load(object sender, EventArgs e)
        {
            if (Globals.theLanguageCode != "")
            {
                ChangeLanguage(Globals.theLanguageCode);
            }

            BalanceWarehouse wh = new BalanceWarehouse();

            wh.UseDefaultCredentials = true;
            wh.WSReturnGeneralSetup(ref Error, ref OK, ref Errormessage);;
            wh.Dispose();
        }
Esempio n. 2
0
        private void fmMain_Load(object sender, EventArgs e)
        {
            Globals.theWinlogon = WindowsIdentity.GetCurrent().Name.ToUpper();
            Globals.theUserID   = Globals.theWinlogon.Substring(Globals.theWinlogon.IndexOf('\\') + 1).ToUpper();
            EmployeeTool et = new EmployeeTool();

            et.GetEmployeeSettings(Globals.theWinlogon);
            if (Globals.theLanguageCode != "")
            {
                ChangeLanguage(Globals.theLanguageCode);
            }

            string Sqlserver       = "";
            string SqlInstance     = "";
            string SqlDatabaseUser = "";
            string Company         = "";
            string WebUrl          = "";
            string Language        = "";

            BalanceWarehouse Warehouse = new BalanceWarehouse();

            Warehouse.UseDefaultCredentials = true;

            try
            {
                Warehouse.WsReturnServerInfo(ref Sqlserver, ref SqlInstance, ref SqlDatabaseUser, ref Company, ref Language, ref WebUrl);
                lbCompanyName.Text = Company;
            }
            catch (Exception ex)
            {
                MessageBoxExample.MyMessageBox.ShowBox(ex.Message);
            }

            try
            {
                string ErrorSound   = "";
                string OkSound      = "";
                bool   Errormessage = false;
                Warehouse.WSReturnGeneralSetup(ref ErrorSound, ref OkSound, ref Errormessage);
                Globals.theOkSoundPath = OkSound;
                Globals.theErrorSound  = ErrorSound;
                Globals.theShowMessage = Errormessage;
            }
            catch (Exception ex)
            {
                MessageBoxExample.MyMessageBox.ShowBox(ex.Message);
            }
            Warehouse.Dispose();
        }