public ActionResult Nuevo()
 {
     var objTipoMovtoMaterial = new Models.TipoMovtoMaterial();
     ViewBag.Titulo = "Nuevo";
     return PartialView("_Nuevo", objTipoMovtoMaterial);
 }
        /// <summary>
        /// Se carga el listado de tipos de movimeintos de materiales
        /// </summary>
        /// <returns>Lista Tipos de movimientos</returns>
        public static Models.TipoMovtoMaterial CargaTipoMovtoMaterial(string idTipoMovtoMaterial)
        {
            object[] paramArray = new object[2];
            try
            {
                paramArray[0] = idTipoMovtoMaterial == "" ? null : idTipoMovtoMaterial;
                paramArray[1] = null;
                
                var db = DatabaseFactory.CreateDatabase("SQLStringConn");

                using (IDataReader dataReader = db.ExecuteReader("usp_CargarTiposMovtoMaterial", paramArray))
                {
                    while (dataReader.Read())
                    {
                        var objTipoMovtoMaterial = new Models.TipoMovtoMaterial()
                        {
                            id = Convert.ToInt32(dataReader["idTipoMovtoMaterial"]),
                            NombreTipoMovtoMaterial = Convert.ToString(dataReader["nombreTipoMovtoMaterial"]),
                            TipoMovimiento = Convert.ToString(dataReader["tipoMovtoMaterial"]),
                            Estatus = Convert.ToString(dataReader["idEstatus"]),                       
                        };

                        return objTipoMovtoMaterial;
                    }
                }
            }
            catch (Exception exp)
            {
                throw new ApplicationException(exp.Message, exp);
            }

            return null;

        }