public List <Fase_Tiempo> Listar_Fase_Tiempo(int id) { SqlCommand comando = new SqlCommand(); comando.Connection = conexion; List <Fase_Tiempo> fases = new List <Fase_Tiempo>(); comando.CommandText = "exec PA_CON_LISTAR_MAN_FASE_TIEMPO_ACTIVO @FK_ID_PROYECTO"; comando.Parameters.AddWithValue("@FK_ID_PROYECTO", id); SqlDataReader list = comando.ExecuteReader(); while (list.Read()) { Fase_Tiempo fase = new Fase_Tiempo(); fase.DESCRIPCION = list.GetString(0); fase.TIEMPO = list.GetDouble(1); fase.ID_FASE = list.GetInt32(2); fases.Add(fase); } list.Dispose(); comando.Dispose(); return(fases); }
public JsonResult actualizar_estado_deshabilitar_fase_tiempo(Fase_Tiempo fase) { var t = fase; string validacion = fase_modelo.actualizar_estado_deshabilitar_fase_tiempo(fase, (string)(Session["User"])); return(Json(validacion, JsonRequestBehavior.AllowGet)); }
public int ActualizarEstadoDeshabilitarFase(Fase_Tiempo fase) { int result = 0; SqlCommand comando = new SqlCommand(); comando.Connection = conexion; comando.CommandText = "execute PA_MAN_DESHABILITAR_FASE_TIEMPO @PK_ID_FASE,@USUARIO, @FECHA"; comando.Parameters.AddWithValue("@PK_ID_FASE", fase.ID_FASE); comando.Parameters.AddWithValue("@USUARIO", fase.USUARIO_MODIFICACION); comando.Parameters.AddWithValue("@FECHA", fase.FECHA_MODIFICACION); result = comando.ExecuteNonQuery(); return(result); }
public JsonResult actualizar_estado_deshabilitar_fase_tiempo(Fase_Tiempo fase) { var t = fase; string validacion = "fail"; Fecha fecha = new Fecha(); Fase_Tiempo fase_tiempo = new Fase_Tiempo(); fase_tiempo.ID_FASE = t.ID_FASE; fase_tiempo.FECHA_MODIFICACION = fecha.fecha(); fase_tiempo.USUARIO_MODIFICACION = (string)(Session["User"]); int result = dao_fase.ActualizarEstadoDeshabilitarFase(fase_tiempo); if (result == 1) { validacion = "sucess"; } return(Json(validacion, JsonRequestBehavior.AllowGet)); }
public string actualizar_estado_deshabilitar_fase_tiempo(Fase_Tiempo fase, string user) { var t = fase; string validacion = "fail"; Fecha fecha = new Fecha(); Fase_Tiempo fase_tiempo = new Fase_Tiempo(); fase_tiempo.ID_FASE = t.ID_FASE; fase_tiempo.FECHA_MODIFICACION = fecha.fecha(); fase_tiempo.USUARIO_MODIFICACION = user; int result = dao_fase.ActualizarEstadoDeshabilitarFase(fase_tiempo); if (result == 1) { validacion = "sucess"; } return(validacion); }
public int AgregarFase_Tiempo(Fase_Tiempo fase, int id_proyecto, string usuario) { int result = 0; Fecha fecha = new Fecha(); SqlCommand comando = new SqlCommand(); comando.Connection = conexion; comando.CommandText = "execute PA_MAN_AGREGAR_FASE_TIEMPO @DESCRIPCION, @TIEMPO,@USUARIO, @FECHA, @FK_ID_PROYECTO, @ESTADO"; comando.Parameters.AddWithValue("@DESCRIPCION", fase.DESCRIPCION); comando.Parameters.AddWithValue("@TIEMPO", fase.TIEMPO); comando.Parameters.AddWithValue("@USUARIO", usuario); comando.Parameters.AddWithValue("@FECHA", fecha.fecha()); comando.Parameters.AddWithValue("@FK_ID_PROYECTO", id_proyecto); comando.Parameters.AddWithValue("@ESTADO", 1); result = comando.ExecuteNonQuery(); return(result); }
public JsonResult agregar_fase(Fase_Tiempo fase) { var t = fase; string validacion = "fail"; Fecha fecha = new Fecha(); Fase_Tiempo fase_tiempo = new Fase_Tiempo(); fase_tiempo.DESCRIPCION = t.DESCRIPCION; fase_tiempo.TIEMPO = t.TIEMPO; fase_tiempo.FECHA_CREACION = fecha.fecha(); fase_tiempo.USUARIO_CREACION = (string)(Session["User"]); fase_tiempo.FK_ID_PROYECTO = t.FK_ID_PROYECTO; int result = dao_fase.AgregarFase_Tiempo(fase_tiempo); if (result == 1) { validacion = "sucess"; } return(Json(validacion, JsonRequestBehavior.AllowGet)); }
public string agregar_fase(Fase_Tiempo fase, string user) { var t = fase; string validacion = "fail"; Fecha fecha = new Fecha(); Fase_Tiempo fase_tiempo = new Fase_Tiempo(); fase_tiempo.DESCRIPCION = t.DESCRIPCION; fase_tiempo.TIEMPO = t.TIEMPO; fase_tiempo.FECHA_CREACION = fecha.fecha(); fase_tiempo.USUARIO_CREACION = user; fase_tiempo.FK_ID_PROYECTO = t.FK_ID_PROYECTO; //int result = dao_fase.AgregarFase_Tiempo(fase_tiempo); //if (result == 1) //{ // validacion = "sucess"; //} return(validacion); }
public JsonResult agregar_fase(Fase_Tiempo fase) { string validacion = fase_modelo.agregar_fase(fase, (string)(Session["User"])); return(Json(validacion, JsonRequestBehavior.AllowGet)); }