public async Task <ActionResult> Edit([Bind(Include = "id_universal,uc_fleet,uc_account,uc_clabe,uc_aba,uc_swift,uc_currency")] UNIVERSAL_COLLECTION uNIVERSAL_COLLECTION)
        {
            if (Session["UniversalID"] != null)
            {
                if (!String.IsNullOrWhiteSpace(Session["UniversalID"].ToString()))
                {
                    int universalID = int.Parse(Session["UniversalID"].ToString());

                    if (ModelState.IsValid)
                    {
                        uNIVERSAL_COLLECTION.id_universal    = universalID;
                        db.Entry(uNIVERSAL_COLLECTION).State = EntityState.Modified;
                        await db.SaveChangesAsync();

                        Session["MessageWarning"] = "Se actualiz&oacute; la informaci&oacute;n correctamente !! ";
                    }
                }
                else
                {
                    Session["MessageWarning"] = "No se pudo actualizar la cuenta virtual, Comunicate con el administrador del sistema.";
                }
            }

            return(RedirectToAction("Index"));
        }
        public async Task <ActionResult> Edit([Bind(Include = "paymentMethodTypeId,paymentMethodTypeCode,paymentMethodDesc")] CAT_PAYMENTMETHODTYPE cAT_PAYMENTMETHODTYPE)
        {
            if (Session["PaymentID"] != null)
            {
                if (!String.IsNullOrWhiteSpace(Session["PaymentID"].ToString()))
                {
                    string paymentID = Session["PaymentID"].ToString();

                    if (ModelState.IsValid)
                    {
                        cAT_PAYMENTMETHODTYPE.paymentMethodTypeCode = paymentID;
                        cAT_PAYMENTMETHODTYPE.Created   = DateTime.Now;
                        cAT_PAYMENTMETHODTYPE.CreatedBy = Environment.UserName;

                        db.Entry(cAT_PAYMENTMETHODTYPE).State = EntityState.Modified;
                        await db.SaveChangesAsync();

                        Session["MessageWarning"] = "La forma de pago " + paymentID + " se actualizo correctamente !! ";
                    }
                }
                else
                {
                    Session["MessageWarning"] = "No se pudo actualizar el forma de pago, Comunicate con el administrador del sistema.";
                }
            }

            return(RedirectToAction("Index"));
        }
Beispiel #3
0
        public async Task <ActionResult> Edit([Bind(Include = "headerUUID")] CFD_HEADER cFD_HEADER)
        {
            if (Session["Header"] != null)
            {
                string headerID = Session["Header"].ToString();

                if (!String.IsNullOrWhiteSpace(headerID))
                {
                    if (ModelState.IsValid)
                    {
                        var uuid           = cFD_HEADER.headerUUID;
                        var headerObs3     = cFD_HEADER.headerObs3;
                        var headerComments = cFD_HEADER.headerComments;

                        cFD_HEADER = await db.CFD_HEADER.FindAsync(headerID);

                        cFD_HEADER.headerObs3     = headerObs3 + headerComments;
                        cFD_HEADER.headerComments = headerComments;
                        cFD_HEADER.headerUUID     = uuid;

                        db.Entry(cFD_HEADER).State = EntityState.Modified;
                        await db.SaveChangesAsync();

                        Session["MessageWarning"] = "Se actualizo la informacion correctamente !! ";
                    }
                }
                else
                {
                    Session["MessageWarning"] = "No se pudo actualizar el cliente, Comunicate con el administrador del sistema.";
                }
            }

            return(RedirectToAction("Index"));
        }
Beispiel #4
0
        public async Task <ActionResult> Edit(AspNetRole aspNetRole)
        {
            if (Session["RoleID"] != null)
            {
                string roleID   = Session["RoleID"].ToString();
                string roleName = aspNetRole.Name;

                if (!String.IsNullOrWhiteSpace(roleID) && !String.IsNullOrWhiteSpace(roleName))
                {
                    aspNetRole = new AspNetRole {
                        Id = roleID, Name = roleName
                    };

                    if (ModelState.IsValid)
                    {
                        db.Entry(aspNetRole).State = EntityState.Modified;
                        await db.SaveChangesAsync();

                        Session["MessageWarning"] = string.Format("Se actualizo el registro : {0}  correctamente... ", aspNetRole.Name);
                    }
                }
                else
                {
                    Session["MessageWarning"] = string.Format("No se pudo actualizar el rol :  {0}  .Comunicate con el administrador del sistema …… ", aspNetRole.Name);
                }
            }

            return(RedirectToAction("Index"));
        }
Beispiel #5
0
        public async Task <ActionResult> Edit([Bind(Include = "CUSTID,CORP_CD,CNTC_NO,ADDRESS1,ADDRESS2,ADDRESS3,CITY,STATE,ZIP,CUSTNAME,RFC,PAYMENT_METHOD_TYPE")] CFD_EXPANDED_ADDRESS CFD_Expanded_Address)
        {
            if (Session["CustomerID"] != null)
            {
                string CustomerID = Session["CustomerID"].ToString();

                if (!String.IsNullOrWhiteSpace(CustomerID))
                {
                    if (ModelState.IsValid)
                    {
                        CFD_Expanded_Address.CUSTID          = CustomerID;
                        CFD_Expanded_Address.CREATED         = DateTime.Now;
                        CFD_Expanded_Address.CREATEDBY       = Environment.UserName;
                        db.Entry(CFD_Expanded_Address).State = EntityState.Modified;
                        await db.SaveChangesAsync();

                        Session["MessageWarning"] = "Se actualizó el cliente " + CustomerID + " correctamente !! ";
                    }
                }
                else
                {
                    Session["MessageWarning"] = "No se pudo actualizar el cliente, Comunicate con el administrador del sistema.";
                }
            }

            return(RedirectToAction("Index"));
        }