コード例 #1
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            BsfGlobal.g_lUserId = 1;
            BsfGlobal.GetDBString();
            BsfGlobal.GetPassString();
            BsfGlobal.CheckPowerUser(BsfGlobal.g_lUserId);
            BsfGlobal.CheckDB();
            BsfGlobal.GetPermission(BsfGlobal.g_lUserId);
            DevExpress.Skins.SkinManager.Default.RegisterAssembly(typeof(DevExpress.UserSkins.OfficeSkins).Assembly);
            DevExpress.Skins.SkinManager.Default.RegisterAssembly(typeof(DevExpress.UserSkins.BonusSkins).Assembly);
            Application.Run(new frmVendorMain());

            //BsfGlobal.g_sUserId = string.Empty;
            //GetDBString();
            //GetPassString();
            //CheckMenu();
            //OpenDB();
            //SetCustomColor(g_lUserId);
            //if (sStr == "1")
            //{
            //    //frmNewProj.Execute("");
            //}
            //else if (sStr == "2")
            //{
            //    //frmOpenProj.ShowDialog();
            //}
            //else
            //{
            //    //frmMDIMain.ShowDialog();
            //}

            //try
            //{
            //Application.EnableVisualStyles();
            //Application.SetCompatibleTextRenderingDefault(false);
            //BsfGlobal.GetDBString();
            //string script = File.ReadAllText(Application.StartupPath + "\\SQLQuery1.sql");

            //BsfGlobal.OpenVendorAnalDB();

            //SqlCommand cmd;
            //cmd = new SqlCommand("DeleteAllProcedures", BsfGlobal.g_VendorDB);
            //cmd.CommandType = System.Data.CommandType.StoredProcedure;
            //cmd.ExecuteNonQuery();

            //string[] splitter = new string[] { "\r\nGO\r\n" };

            //string[] commandTexts = script.Split(splitter,
            //  StringSplitOptions.RemoveEmptyEntries);
            //foreach (string commandText in commandTexts)
            //{
            //   cmd = new SqlCommand(commandText, BsfGlobal.g_VendorDB);
            //    cmd.CommandType = System.Data.CommandType.Text;
            //    try
            //    {
            //        cmd.ExecuteNonQuery();
            //    }
            //    catch (Exception e)
            //    {
            //        MessageBox.Show(e.ToString());
            //    }

            //    Server server = new Server(new ServerConnection(BsfGlobal.OpenVendorAnalDB()));
            //    server.ConnectionContext.ExecuteNonQuery(script);
            //}
            //catch (Exception e)
            //{
            //    throw e;
            //}
            //    Application.Run(new frmVendor());
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: SDivyaprabha/CRM1
        static void Main()
        {
            //CultureInfo _oCultureInfo = new CultureInfo("en-US", false);

            //int[] sGroupFormat = { 3, 2 };

            //NumberFormatInfo oNumberFormatInfo = new NumberFormatInfo() { NumberGroupSizes = sGroupFormat };

            //_oCultureInfo.NumberFormat = oNumberFormatInfo;

            //Application.CurrentCulture = _oCultureInfo;

            DevExpress.Skins.SkinManager.Default.RegisterAssembly(typeof(DevExpress.UserSkins.OfficeSkins).Assembly);
            DevExpress.Skins.SkinManager.Default.RegisterAssembly(typeof(DevExpress.UserSkins.BonusSkins).Assembly);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            BsfGlobal.GetDBString();
            BsfGlobal.GetPassString();
            if (BsfGlobal.CheckDB() == false)
            {
                Application.Exit(); return;
            }
            if (BsfGlobal.g_bWFDB == false)
            {
                MessageBox.Show("Work Flow DB Not Found");
                Application.Exit();
                return;
            }
            BsfGlobal.LoadFunctionalNames();
            //BsfGlobal.GetPermission(BsfGlobal.g_lUserId);
            //BsfGlobal.GetPermission(1);
            //BsfGlobal.CheckPowerUser(1);
            //BsfGlobal.g_lUserId = 1;
            BsfGlobal.g_sCurrencyName = "Rupees";
            BsfGlobal.g_sDigitFormat  = "n2";
            BsfGlobal.g_sDigitFormatS = "{0:n2}";

            // Currency Decimal Point
            CultureInfo _oCultureInfo = new CultureInfo("en-US", false);

            int[] sGroupFormat = { 9, 0 };

            if (CommFun.g_iCurrencyDigit == 1)
            {
                int[] sGroupFormat1 = { 3, 3 }; sGroupFormat = sGroupFormat1;
            }
            if (CommFun.g_iCurrencyDigit == 2)
            {
                int[] sGroupFormat1 = { 3, 0 }; sGroupFormat = sGroupFormat1;
            }
            if (CommFun.g_iCurrencyDigit == 3 || CommFun.g_iCurrencyDigit == 0)
            {
                int[] sGroupFormat1 = { 3, 2 }; sGroupFormat = sGroupFormat1;
            }

            NumberFormatInfo oNumberFormatInfo = new NumberFormatInfo()
            {
                NumberGroupSizes = sGroupFormat
            };
            DateTimeFormatInfo oDateFormatInfo = new DateTimeFormatInfo()
            {
                ShortDatePattern = "dd/MM/yyyy"
            };

            _oCultureInfo.NumberFormat   = oNumberFormatInfo;
            _oCultureInfo.DateTimeFormat = oDateFormatInfo;

            Application.CurrentCulture = _oCultureInfo;

            Application.Run(new frmLogin());
            Application.DoEvents();
        }