private void showPos_FabricsTypeData()
    {
        Pos_FabricsType pos_FabricsType = new Pos_FabricsType();
        pos_FabricsType = Pos_FabricsTypeManager.GetPos_FabricsTypeByID(Int32.Parse(Request.QueryString["pos_FabricsTypeID"]));

        txtFabricsTypeName.Text = pos_FabricsType.FabricsTypeName;
    }
示例#2
0
 public static Pos_FabricsType GetPos_FabricsTypeByID(int id)
 {
     Pos_FabricsType pos_FabricsType = new Pos_FabricsType();
     SqlPos_FabricsTypeProvider sqlPos_FabricsTypeProvider = new SqlPos_FabricsTypeProvider();
     pos_FabricsType = sqlPos_FabricsTypeProvider.GetPos_FabricsTypeByID(id);
     return pos_FabricsType;
 }
示例#3
0
    public static Pos_FabricsType GetPos_FabricsTypeByID(int id)
    {
        Pos_FabricsType            pos_FabricsType            = new Pos_FabricsType();
        SqlPos_FabricsTypeProvider sqlPos_FabricsTypeProvider = new SqlPos_FabricsTypeProvider();

        pos_FabricsType = sqlPos_FabricsTypeProvider.GetPos_FabricsTypeByID(id);
        return(pos_FabricsType);
    }
    private void showPos_FabricsTypeData()
    {
        Pos_FabricsType pos_FabricsType = new Pos_FabricsType();

        pos_FabricsType = Pos_FabricsTypeManager.GetPos_FabricsTypeByID(Int32.Parse(Request.QueryString["pos_FabricsTypeID"]));

        txtFabricsTypeName.Text = pos_FabricsType.FabricsTypeName;
    }
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        Pos_FabricsType pos_FabricsType = new Pos_FabricsType();

        pos_FabricsType.FabricsTypeName = txtFabricsTypeName.Text;
        int resutl = Pos_FabricsTypeManager.InsertPos_FabricsType(pos_FabricsType);
        Response.Redirect("AdminPos_FabricsTypeDisplay.aspx");
    }
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        Pos_FabricsType pos_FabricsType = new Pos_FabricsType();

        pos_FabricsType.FabricsTypeName = txtFabricsTypeName.Text;
        int resutl = Pos_FabricsTypeManager.InsertPos_FabricsType(pos_FabricsType);

        Response.Redirect("AdminPos_FabricsTypeDisplay.aspx");
    }
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        Pos_FabricsType pos_FabricsType = new Pos_FabricsType();
        pos_FabricsType = Pos_FabricsTypeManager.GetPos_FabricsTypeByID(Int32.Parse(Request.QueryString["pos_FabricsTypeID"]));
        Pos_FabricsType tempPos_FabricsType = new Pos_FabricsType();
        tempPos_FabricsType.Pos_FabricsTypeID = pos_FabricsType.Pos_FabricsTypeID;

        tempPos_FabricsType.FabricsTypeName = txtFabricsTypeName.Text;
        bool result = Pos_FabricsTypeManager.UpdatePos_FabricsType(tempPos_FabricsType);
        Response.Redirect("AdminPos_FabricsTypeDisplay.aspx");
    }
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        Pos_FabricsType pos_FabricsType = new Pos_FabricsType();

        pos_FabricsType = Pos_FabricsTypeManager.GetPos_FabricsTypeByID(Int32.Parse(Request.QueryString["pos_FabricsTypeID"]));
        Pos_FabricsType tempPos_FabricsType = new Pos_FabricsType();

        tempPos_FabricsType.Pos_FabricsTypeID = pos_FabricsType.Pos_FabricsTypeID;

        tempPos_FabricsType.FabricsTypeName = txtFabricsTypeName.Text;
        bool result = Pos_FabricsTypeManager.UpdatePos_FabricsType(tempPos_FabricsType);

        Response.Redirect("AdminPos_FabricsTypeDisplay.aspx");
    }
示例#9
0
    public int InsertPos_FabricsType(Pos_FabricsType pos_FabricsType)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("GP_InsertPos_FabricsType", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@Pos_FabricsTypeID", SqlDbType.Int).Direction = ParameterDirection.Output;
            cmd.Parameters.Add("@FabricsTypeName", SqlDbType.NVarChar).Value  = pos_FabricsType.FabricsTypeName;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return((int)cmd.Parameters["@Pos_FabricsTypeID"].Value);
        }
    }
示例#10
0
    public bool UpdatePos_FabricsType(Pos_FabricsType pos_FabricsType)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("GP_UpdatePos_FabricsType", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@Pos_FabricsTypeID", SqlDbType.Int).Value    = pos_FabricsType.Pos_FabricsTypeID;
            cmd.Parameters.Add("@FabricsTypeName", SqlDbType.NVarChar).Value = pos_FabricsType.FabricsTypeName;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return(result == 1);
        }
    }
示例#11
0
 public Pos_FabricsType GetPos_FabricsTypeFromReader(IDataReader reader)
 {
     try
     {
         Pos_FabricsType pos_FabricsType = new Pos_FabricsType
             (
                 (int)reader["Pos_FabricsTypeID"],
                 reader["FabricsTypeName"].ToString()
             );
          return pos_FabricsType;
     }
     catch(Exception ex)
     {
         return null;
     }
 }
示例#12
0
 public Pos_FabricsType GetPos_FabricsTypeFromReader(IDataReader reader)
 {
     try
     {
         Pos_FabricsType pos_FabricsType = new Pos_FabricsType
                                           (
             (int)reader["Pos_FabricsTypeID"],
             reader["FabricsTypeName"].ToString()
                                           );
         return(pos_FabricsType);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
示例#13
0
    public bool UpdatePos_FabricsType(Pos_FabricsType pos_FabricsType)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("GP_UpdatePos_FabricsType", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@Pos_FabricsTypeID", SqlDbType.Int).Value = pos_FabricsType.Pos_FabricsTypeID;
            cmd.Parameters.Add("@FabricsTypeName", SqlDbType.NVarChar).Value = pos_FabricsType.FabricsTypeName;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return result == 1;
        }
    }
示例#14
0
    public int InsertPos_FabricsType(Pos_FabricsType pos_FabricsType)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("GP_InsertPos_FabricsType", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@Pos_FabricsTypeID", SqlDbType.Int).Direction = ParameterDirection.Output;
            cmd.Parameters.Add("@FabricsTypeName", SqlDbType.NVarChar).Value = pos_FabricsType.FabricsTypeName;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return (int)cmd.Parameters["@Pos_FabricsTypeID"].Value;
        }
    }
示例#15
0
 public static bool UpdatePos_FabricsType(Pos_FabricsType pos_FabricsType)
 {
     SqlPos_FabricsTypeProvider sqlPos_FabricsTypeProvider = new SqlPos_FabricsTypeProvider();
     return sqlPos_FabricsTypeProvider.UpdatePos_FabricsType(pos_FabricsType);
 }
示例#16
0
 public static int InsertPos_FabricsType(Pos_FabricsType pos_FabricsType)
 {
     SqlPos_FabricsTypeProvider sqlPos_FabricsTypeProvider = new SqlPos_FabricsTypeProvider();
     return sqlPos_FabricsTypeProvider.InsertPos_FabricsType(pos_FabricsType);
 }
示例#17
0
    public static bool UpdatePos_FabricsType(Pos_FabricsType pos_FabricsType)
    {
        SqlPos_FabricsTypeProvider sqlPos_FabricsTypeProvider = new SqlPos_FabricsTypeProvider();

        return(sqlPos_FabricsTypeProvider.UpdatePos_FabricsType(pos_FabricsType));
    }
示例#18
0
    public static int InsertPos_FabricsType(Pos_FabricsType pos_FabricsType)
    {
        SqlPos_FabricsTypeProvider sqlPos_FabricsTypeProvider = new SqlPos_FabricsTypeProvider();

        return(sqlPos_FabricsTypeProvider.InsertPos_FabricsType(pos_FabricsType));
    }