示例#1
0
 public static Pos_Size GetPos_SizeByID(int id)
 {
     Pos_Size pos_Size = new Pos_Size();
     SqlPos_SizeProvider sqlPos_SizeProvider = new SqlPos_SizeProvider();
     pos_Size = sqlPos_SizeProvider.GetPos_SizeByID(id);
     return pos_Size;
 }
示例#2
0
    public static Pos_Size GetPos_SizeByID(int id)
    {
        Pos_Size            pos_Size            = new Pos_Size();
        SqlPos_SizeProvider sqlPos_SizeProvider = new SqlPos_SizeProvider();

        pos_Size = sqlPos_SizeProvider.GetPos_SizeByID(id);
        return(pos_Size);
    }
    private void showPos_SizeData()
    {
        Pos_Size pos_Size = new Pos_Size();
        pos_Size = Pos_SizeManager.GetPos_SizeByID(Int32.Parse(Request.QueryString["pos_SizeID"]));

        txtSizeName.Text = pos_Size.SizeName;
        txtCode.Text = pos_Size.Code;
    }
示例#4
0
    private void showPos_SizeData()
    {
        Pos_Size pos_Size = new Pos_Size();

        pos_Size = Pos_SizeManager.GetPos_SizeByID(Int32.Parse(Request.QueryString["pos_SizeID"]));

        txtSizeName.Text = pos_Size.SizeName;
        txtCode.Text     = pos_Size.Code;
    }
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        Pos_Size pos_Size = new Pos_Size();

        pos_Size.SizeName = txtSizeName.Text;
        pos_Size.Code = txtCode.Text;
        int resutl = Pos_SizeManager.InsertPos_Size(pos_Size);
        Response.Redirect("AdminPos_SizeDisplay.aspx");
    }
示例#6
0
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        Pos_Size pos_Size = new Pos_Size();

        pos_Size.SizeName = txtSizeName.Text;
        pos_Size.Code     = txtCode.Text;
        int resutl = Pos_SizeManager.InsertPos_Size(pos_Size);

        Response.Redirect("AdminPos_SizeDisplay.aspx");
    }
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        Pos_Size pos_Size = new Pos_Size();
        pos_Size = Pos_SizeManager.GetPos_SizeByID(Int32.Parse(Request.QueryString["pos_SizeID"]));
        Pos_Size tempPos_Size = new Pos_Size();
        tempPos_Size.Pos_SizeID = pos_Size.Pos_SizeID;

        tempPos_Size.SizeName = txtSizeName.Text;
        tempPos_Size.Code = txtCode.Text;
        bool result = Pos_SizeManager.UpdatePos_Size(tempPos_Size);
        Response.Redirect("AdminPos_SizeDisplay.aspx");
    }
示例#8
0
    public int InsertPos_Size(Pos_Size pos_Size)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("GP_InsertPos_Size", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@Pos_SizeID", SqlDbType.Int).Direction = ParameterDirection.Output;
            cmd.Parameters.Add("@SizeName", SqlDbType.NVarChar).Value  = pos_Size.SizeName;
            cmd.Parameters.Add("@Code", SqlDbType.NChar).Value         = pos_Size.Code;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return((int)cmd.Parameters["@Pos_SizeID"].Value);
        }
    }
示例#9
0
    public bool UpdatePos_Size(Pos_Size pos_Size)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("GP_UpdatePos_Size", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@Pos_SizeID", SqlDbType.Int).Value    = pos_Size.Pos_SizeID;
            cmd.Parameters.Add("@SizeName", SqlDbType.NVarChar).Value = pos_Size.SizeName;
            cmd.Parameters.Add("@Code", SqlDbType.NChar).Value        = pos_Size.Code;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return(result == 1);
        }
    }
示例#10
0
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        Pos_Size pos_Size = new Pos_Size();

        pos_Size = Pos_SizeManager.GetPos_SizeByID(Int32.Parse(Request.QueryString["pos_SizeID"]));
        Pos_Size tempPos_Size = new Pos_Size();

        tempPos_Size.Pos_SizeID = pos_Size.Pos_SizeID;

        tempPos_Size.SizeName = txtSizeName.Text;
        tempPos_Size.Code     = txtCode.Text;
        bool result = Pos_SizeManager.UpdatePos_Size(tempPos_Size);

        Response.Redirect("AdminPos_SizeDisplay.aspx");
    }
示例#11
0
 public Pos_Size GetPos_SizeFromReader(IDataReader reader)
 {
     try
     {
         Pos_Size pos_Size = new Pos_Size
                             (
             (int)reader["Pos_SizeID"],
             reader["SizeName"].ToString(),
             reader["Code"].ToString()
                             );
         return(pos_Size);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
示例#12
0
    public static bool UpdatePos_Size(Pos_Size pos_Size)
    {
        SqlPos_SizeProvider sqlPos_SizeProvider = new SqlPos_SizeProvider();

        return(sqlPos_SizeProvider.UpdatePos_Size(pos_Size));
    }
示例#13
0
    public static int InsertPos_Size(Pos_Size pos_Size)
    {
        SqlPos_SizeProvider sqlPos_SizeProvider = new SqlPos_SizeProvider();

        return(sqlPos_SizeProvider.InsertPos_Size(pos_Size));
    }
示例#14
0
 public static bool UpdatePos_Size(Pos_Size pos_Size)
 {
     SqlPos_SizeProvider sqlPos_SizeProvider = new SqlPos_SizeProvider();
     return sqlPos_SizeProvider.UpdatePos_Size(pos_Size);
 }
示例#15
0
 public static int InsertPos_Size(Pos_Size pos_Size)
 {
     SqlPos_SizeProvider sqlPos_SizeProvider = new SqlPos_SizeProvider();
     return sqlPos_SizeProvider.InsertPos_Size(pos_Size);
 }