public ActionResult Parametros()
        {
            List <ParametrosModels> para = ParametrosDAO.BuscarParametros();

            ViewBag.Parametros = para;

            return(View());
        }
        public ActionResult Parametros(FormCollection frm)
        {
            int numero;

            if (Request.Form["valorRadio"].ToString() == "P")
            {
                numero = 0;
            }
            else
            {
                numero = 1;
            }
            ParametrosModels apo = new ParametrosModels();

            apo.Aprobador = numero;

            List <ParametrosModels> lis = ParametrosDAO.ModificarParametros(apo);

            List <ParametrosModels> para = ParametrosDAO.BuscarParametros();

            ViewBag.Parametros = para;

            return(View());
        }
示例#3
0
        public JsonResult AgregarNV(FormCollection frm, int NVNumero, DateTime nvFem, DateTime nvFeEnt, string CodAux, string VenCod,
                                    string CodLista, string nvObser, string CveCod, string NomCon, string CodiCC, double nvSubTotal, double nvMonto,
                                    double nvNetoAfecto, string Usuario, string UsuarioGeneraDocto, DateTime FechaHoraCreacion, double TotalBoleta,
                                    string id, string CodLugarDesp)
        {
            int numSoft = 0;

            try
            {
                #region "NVC"
                NotadeVentaCabeceraModels NVC = new NotadeVentaCabeceraModels
                {
                    NVNumero             = NVNumero,
                    nvFem                = nvFem,
                    nvEstado             = "A",
                    nvEstFact            = 0,
                    nvEstDesp            = 0,
                    nvEstRese            = 0,
                    nvEstConc            = 0,
                    nvFeEnt              = nvFeEnt,
                    CodAux               = CodAux,
                    VenCod               = VenCod,
                    CodMon               = "01",
                    CodLista             = CodLista,
                    nvObser              = nvObser,
                    CveCod               = CveCod,
                    NomCon               = NomCon,
                    CodiCC               = CodiCC,
                    nvSubTotal           = nvSubTotal,
                    nvPorcDesc01         = 0,
                    nvDescto01           = 0,
                    nvPorcDesc02         = 0,
                    nvDescto02           = 0,
                    nvPorcDesc03         = 0,
                    nvDescto03           = 0,
                    nvPorcDesc04         = 0,
                    nvDescto04           = 0,
                    nvPorcDesc05         = 0,
                    nvDescto05           = 0,
                    nvMonto              = nvMonto,
                    NumGuiaRes           = 0,
                    nvPorcFlete          = 0,
                    nvValflete           = 0,
                    nvPorcEmb            = 0,
                    nvEquiv              = 1,
                    nvNetoExento         = 0,
                    nvNetoAfecto         = nvNetoAfecto,
                    nvTotalDesc          = 0,
                    ConcAuto             = "N",
                    CheckeoPorAlarmaVtas = "N",
                    EnMantencion         = 0,
                    Usuario              = Usuario,
                    UsuarioGeneraDocto   = UsuarioGeneraDocto,
                    FechaHoraCreacion    = FechaHoraCreacion,
                    Sistema              = "NW",
                    ConcManual           = "N",
                    proceso              = "Notas de Venta",
                    TotalBoleta          = TotalBoleta,
                    NumReq               = 0,
                    CodVenWeb            = "5",
                    CodLugarDesp         = CodLugarDesp
                };
                #endregion

                List <ParametrosModels> para = ParametrosDAO.BuscarParametros();

                if (para[0].Aprobador == 1)
                {
                    NVC.EstadoNP = "P";
                }
                else
                {
                    NVC.EstadoNP = "A";
                }

                if (para[0].Aprobador == 1)
                {
                    List <NotadeVentaCabeceraModels> NVSoft = NotaDeVentaDAO.EditarNV(NVC);
                    ViewBag.NVnum = NVC.NVNumero;
                    numSoft       = NVC.NVNumero;
                }
                else
                {
                    List <NotadeVentaCabeceraModels> NVSoft = NotaDeVentaDAO.InsertarNvSoftland(NVC);
                    ViewBag.NVnum = NVSoft[0].NVNumero;
                    numSoft       = NVSoft[0].NVNumero;
                }


                //EMail
                //VerificationEmail(NVNumero);
                //return Json(NV);
            }
            catch (Exception ex)
            {
                Archivo.CrearArchivo(Server, "ERROR: " + ex.Message);
            }

            return(Json(new { ID = id, NVNUM = numSoft }));
        }
示例#4
0
        public JsonResult AgregarNV(FormCollection frm, int NVNumero, DateTime nvFem, DateTime nvFeEnt, string CodAux, string VenCod,
                                    string CodLista, string nvObser, string CveCod, string NomCon, string CodiCC, double nvSubTotal, double nvMonto,
                                    double nvNetoAfecto, string Usuario, string UsuarioGeneraDocto, DateTime FechaHoraCreacion, double TotalBoleta,
                                    string id, string CodLugarDesp)
        {
            #region "NVC"
            try
            {
                NotadeVentaCabeceraModels NVC = new NotadeVentaCabeceraModels
                {
                    NVNumero             = NVNumero,
                    nvFem                = nvFem,
                    nvEstado             = "P",
                    nvEstFact            = 0,
                    nvEstDesp            = 0,
                    nvEstRese            = 0,
                    nvEstConc            = 0,
                    nvFeEnt              = nvFeEnt,
                    CodAux               = CodAux,
                    VenCod               = VenCod,
                    CodMon               = "01",
                    CodLista             = CodLista,
                    nvObser              = nvObser,
                    CveCod               = CveCod,
                    NomCon               = NomCon,
                    CodiCC               = CodiCC,
                    nvSubTotal           = nvSubTotal,
                    nvPorcDesc01         = 0,
                    nvDescto01           = 0,
                    nvPorcDesc02         = 0,
                    nvDescto02           = 0,
                    nvPorcDesc03         = 0,
                    nvDescto03           = 0,
                    nvPorcDesc04         = 0,
                    nvDescto04           = 0,
                    nvPorcDesc05         = 0,
                    nvDescto05           = 0,
                    nvMonto              = nvMonto,
                    NumGuiaRes           = 0,
                    nvPorcFlete          = 0,
                    nvValflete           = 0,
                    nvPorcEmb            = 0,
                    nvEquiv              = 1,
                    nvNetoExento         = 0,
                    nvNetoAfecto         = nvNetoAfecto,
                    nvTotalDesc          = 0,
                    ConcAuto             = "N",
                    CheckeoPorAlarmaVtas = "N",
                    EnMantencion         = 0,
                    Usuario              = Usuario,
                    UsuarioGeneraDocto   = UsuarioGeneraDocto,
                    FechaHoraCreacion    = FechaHoraCreacion,
                    Sistema              = "NW",
                    ConcManual           = "N",
                    proceso              = "Notas de Venta",
                    TotalBoleta          = TotalBoleta,
                    NumReq               = 0,
                    CodVenWeb            = "5",
                    CodLugarDesp         = CodLugarDesp
                };
                #endregion

                List <ParametrosModels> para = ParametrosDAO.BuscarParametros();

                if (para[0].Aprobador == 1)
                {
                    NVC.EstadoNP = "P";
                }
                else
                {
                    NVC.EstadoNP = "P";
                }

                if (para[0].Aprobador == 1)
                {
                    List <NotadeVentaCabeceraModels> NV = NotaDeVentaDAO.EditarNV(NVC);
                }
                else
                {
                }
                //EMail
                VerificationEmail(NVNumero, NomCon);
                return(Json(new { ID = id }));
            }
            catch (Exception ex)
            {
                throw(ex);
            }
            //return RedirectToAction("Misclientes", "Ventas", new { ID = id });
        }