Ejemplo n.º 1
0
        private static void SetupConnection()
        {
            MySqlConnection      newMySQLConn;
            IVariableSettingRepo VariableSettingRepo = new VariableSettingRepo();
            VariableSetting      VariableSetting     = VariableSettingRepo.GetBy("Status");

            if (VariableSetting != null)
            {
                if (!string.IsNullOrEmpty(VariableSetting.Value) && VariableSetting.Value.ToUpper() == "PRODUCTION")
                {
                    VariableSetting VariableSettingConStr = VariableSettingRepo.GetBy("MySQLConn");
                    newMySQLConn = new MySqlConnection(WFUtils.Decrypt(VariableSettingConStr.Value));
                }
                else
                {
                    newMySQLConn = new MySqlConnection("Server=127.0.0.1;Database=tsspk1511;Uid=root;Pwd=;");
                }
            }
        }
Ejemplo n.º 2
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            string Nama = new VariableSettingRepo().GetBy("UserKeyIn").Value + " | " + DateTime.Now.ToString("dd-MM-yyyy HH:mm:ss");

            tssUserKeyIn.Text = Nama;
        }