Пример #1
0
        public DataSet ProcesarFechaSistema(FechaSistemaBE BE)
        {
            DataSet dsResult;

            try
            {
                cmd = db.GetStoredProcCommand("FechaSistema_Mnt");
                db.AddInParameter(cmd, "OPCION", DbType.Int32, BE.OPCION);
                dsResult = db.ExecuteDataSet(cmd);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(dsResult);
        }
Пример #2
0
        public static void Main(string[] args)
        {
            try
            {
                bool   logged  = false;
                string TipoApp = "00";
                //General.General.GetCodigoUsuario = "ADMIN";
                //General.General.GetUsuario = "ADMIN";

                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                DataSet        dsFechaSistema = new DataSet();
                FechaSistemaBL FechaSistemaBL = new FechaSistemaBL();
                FechaSistemaBE FechaSistemaBE = new FechaSistemaBE()
                {
                    OPCION  = 1,
                    USUARIO = "ADMIN",
                };

                /*
                 * dsFechaSistema = FechaSistemaBL.ProcesarFechaSistema(FechaSistemaBE);
                 * if (dsFechaSistema.Tables[0].Rows.Count > 0)
                 * {
                 *  EfideFactoring.General.General.gFechaOp = Convert.ToDateTime(dsFechaSistema.Tables[0].Rows[0]["fechaDia"]);
                 * }
                 *
                 *
                 * //getParam();
                 * //logged = false;
                 * logged = EfideFactoring.General.General.validLoginUser(getParam());
                 *
                 * //FormulaBase.frmLogin login = new FormulaBase.frmLogin();
                 * if (!logged)
                 *  Application.Exit();
                 * //login.ShowDialog();
                 *
                 * //if ((login.DialogResult == DialogResult.OK) || logged)
                 * if (logged)
                 * {
                 *
                 *  DataSet ds = new DataSet();
                 *  UsuarioBL UsuarioBL = new UsuarioBL();
                 *
                 *  if (TipoApp == "00")
                 *  {
                 *      // VERIFICA TIPO DE CAMBIO
                 *      //UsuarioBE UsuarioBE2 = new UsuarioBE()
                 *      //{
                 *      //    OPCION = 2,
                 *      //    pfecha = EfideFactoring.General.General.gFechaOp,
                 *      //};
                 *      //ds = UsuarioBL.ProcesarUsuario(UsuarioBE2);
                 *
                 *      if (System.Diagnostics.Debugger.IsAttached)
                 *      {
                 *          // VERIFICA SI USUARIO EXISTE
                 *          // COMPILADO
                 *          UsuarioBE UsuarioBE = new UsuarioBE()
                 *          {
                 *              usuarioID = General.General.GetCodigoUsuario,
                 *              OPCION = 3,
                 *              pfecha = EfideFactoring.General.General.gFechaOp,
                 *          };
                 *          ds = UsuarioBL.ProcesarUsuario(UsuarioBE);
                 *      }
                 *      else
                 *      {
                 *          UsuarioBE UsuarioBE = new UsuarioBE()
                 *          {
                 *              usuarioID = EfideFactoring.General.General.GetCodigoUsuario,
                 *              OPCION = 3,
                 *              pfecha = EfideFactoring.General.General.gFechaOp,
                 *          };
                 *          ds = UsuarioBL.ProcesarUsuario(UsuarioBE);
                 *      }
                 *      {
                 *          Application.Run(new FormulaBase.frmMenu());
                 *      }
                 *  }
                 *  else if (TipoApp == "01")
                 *  {
                 *      Application.Run(new FormulaBase.frmMenuLoad());
                 *  }
                 * }
                 * else
                 * {
                 *  throw new Exception("No se pudo iniciar sesión");
                 * }
                 *
                 */

                logged = true;
                EfideFactoring.General.General.gFechaOp = DateTime.Now;
                Application.Run(new FormulaBase.frmMenu());
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + " Params: " + General.General.GetParamsGlobal, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Application.Exit();
            }
        }
Пример #3
0
 public DataSet ProcesarFechaSistema(FechaSistemaBE BE)
 {
     return(FechaSistemaDAL.ProcesarFechaSistema(BE));
 }