Ejemplo n.º 1
0
    private void showAL_HelpTypeData()
    {
        AL_HelpType aL_HelpType = new AL_HelpType();

        aL_HelpType = AL_HelpTypeManager.GetAL_HelpTypeByID(Int32.Parse(Request.QueryString["aL_HelpTypeID"]));

        txtHelpTypeName.Text = aL_HelpType.HelpTypeName;
    }
Ejemplo n.º 2
0
    public static AL_HelpType GetAL_HelpTypeByID(int id)
    {
        AL_HelpType            aL_HelpType            = new AL_HelpType();
        SqlAL_HelpTypeProvider sqlAL_HelpTypeProvider = new SqlAL_HelpTypeProvider();

        aL_HelpType = sqlAL_HelpTypeProvider.GetAL_HelpTypeByID(id);
        return(aL_HelpType);
    }
Ejemplo n.º 3
0
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        AL_HelpType aL_HelpType = new AL_HelpType();

        aL_HelpType.HelpTypeName = txtHelpTypeName.Text;
        int resutl = AL_HelpTypeManager.InsertAL_HelpType(aL_HelpType);

        Response.Redirect("AdminAL_HelpTypeDisplay.aspx");
    }
Ejemplo n.º 4
0
    public int InsertAL_HelpType(AL_HelpType aL_HelpType)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("AL_InsertAL_HelpType", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@AL_HelpTypeID", SqlDbType.Int).Direction = ParameterDirection.Output;
            cmd.Parameters.Add("@HelpTypeName", SqlDbType.NVarChar).Value = aL_HelpType.HelpTypeName;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return((int)cmd.Parameters["@AL_HelpTypeID"].Value);
        }
    }
Ejemplo n.º 5
0
    public bool UpdateAL_HelpType(AL_HelpType aL_HelpType)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("AL_UpdateAL_HelpType", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@AL_HelpTypeID", SqlDbType.Int).Value     = aL_HelpType.AL_HelpTypeID;
            cmd.Parameters.Add("@HelpTypeName", SqlDbType.NVarChar).Value = aL_HelpType.HelpTypeName;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return(result == 1);
        }
    }
Ejemplo n.º 6
0
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        AL_HelpType aL_HelpType = new AL_HelpType();

        aL_HelpType = AL_HelpTypeManager.GetAL_HelpTypeByID(Int32.Parse(Request.QueryString["aL_HelpTypeID"]));
        AL_HelpType tempAL_HelpType = new AL_HelpType();

        tempAL_HelpType.AL_HelpTypeID = aL_HelpType.AL_HelpTypeID;

        tempAL_HelpType.HelpTypeName = txtHelpTypeName.Text;
        bool result = AL_HelpTypeManager.UpdateAL_HelpType(tempAL_HelpType);

        Response.Redirect("AdminAL_HelpTypeDisplay.aspx");
    }
Ejemplo n.º 7
0
 public AL_HelpType GetAL_HelpTypeFromReader(IDataReader reader)
 {
     try
     {
         AL_HelpType aL_HelpType = new AL_HelpType
                                   (
             (int)reader["AL_HelpTypeID"],
             reader["HelpTypeName"].ToString()
                                   );
         return(aL_HelpType);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Ejemplo n.º 8
0
    public static bool UpdateAL_HelpType(AL_HelpType aL_HelpType)
    {
        SqlAL_HelpTypeProvider sqlAL_HelpTypeProvider = new SqlAL_HelpTypeProvider();

        return(sqlAL_HelpTypeProvider.UpdateAL_HelpType(aL_HelpType));
    }
Ejemplo n.º 9
0
    public static int InsertAL_HelpType(AL_HelpType aL_HelpType)
    {
        SqlAL_HelpTypeProvider sqlAL_HelpTypeProvider = new SqlAL_HelpTypeProvider();

        return(sqlAL_HelpTypeProvider.InsertAL_HelpType(aL_HelpType));
    }