示例#1
0
 public static Pos_SizeProduct GetPos_SizeProductByID(int id)
 {
     Pos_SizeProduct pos_SizeProduct = new Pos_SizeProduct();
     SqlPos_SizeProductProvider sqlPos_SizeProductProvider = new SqlPos_SizeProductProvider();
     pos_SizeProduct = sqlPos_SizeProductProvider.GetPos_SizeProductByID(id);
     return pos_SizeProduct;
 }
示例#2
0
    public static Pos_SizeProduct GetPos_SizeProductByID(int id)
    {
        Pos_SizeProduct            pos_SizeProduct            = new Pos_SizeProduct();
        SqlPos_SizeProductProvider sqlPos_SizeProductProvider = new SqlPos_SizeProductProvider();

        pos_SizeProduct = sqlPos_SizeProductProvider.GetPos_SizeProductByID(id);
        return(pos_SizeProduct);
    }
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        Pos_SizeProduct pos_SizeProduct = new Pos_SizeProduct();

        pos_SizeProduct.Pos_SizeID = Int32.Parse(ddlPos_Size.SelectedValue);
        pos_SizeProduct.ProductID = Int32.Parse(ddlProduct.SelectedValue);
        int resutl = Pos_SizeProductManager.InsertPos_SizeProduct(pos_SizeProduct);
        Response.Redirect("AdminPos_SizeProductDisplay.aspx");
    }
    private void showPos_SizeProductData()
    {
        Pos_SizeProduct pos_SizeProduct = new Pos_SizeProduct();

        pos_SizeProduct = Pos_SizeProductManager.GetPos_SizeProductByID(Int32.Parse(Request.QueryString["pos_SizeProductID"]));

        ddlPos_Size.SelectedValue = pos_SizeProduct.Pos_SizeID.ToString();
        ddlProduct.SelectedValue  = pos_SizeProduct.ProductID.ToString();
    }
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        Pos_SizeProduct pos_SizeProduct = new Pos_SizeProduct();

        pos_SizeProduct.Pos_SizeID = Int32.Parse(ddlPos_Size.SelectedValue);
        pos_SizeProduct.ProductID  = Int32.Parse(ddlProduct.SelectedValue);
        int resutl = Pos_SizeProductManager.InsertPos_SizeProduct(pos_SizeProduct);

        Response.Redirect("AdminPos_SizeProductDisplay.aspx");
    }
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        Pos_SizeProduct pos_SizeProduct = new Pos_SizeProduct();
        pos_SizeProduct = Pos_SizeProductManager.GetPos_SizeProductByID(Int32.Parse(Request.QueryString["pos_SizeProductID"]));
        Pos_SizeProduct tempPos_SizeProduct = new Pos_SizeProduct();
        tempPos_SizeProduct.Pos_SizeProductID = pos_SizeProduct.Pos_SizeProductID;

        tempPos_SizeProduct.Pos_SizeID = Int32.Parse(ddlPos_Size.SelectedValue);
        tempPos_SizeProduct.ProductID = Int32.Parse(ddlProduct.SelectedValue);
        bool result = Pos_SizeProductManager.UpdatePos_SizeProduct(tempPos_SizeProduct);
        Response.Redirect("AdminPos_SizeProductDisplay.aspx");
    }
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        Pos_SizeProduct pos_SizeProduct = new Pos_SizeProduct();

        pos_SizeProduct.Pos_SizeID = Int32.Parse(ddlPos_Size.SelectedValue);
        pos_SizeProduct.ProductID = Int32.Parse(ddlProduct.SelectedValue);
        int resutl = Pos_SizeProductManager.InsertPos_SizeProduct(pos_SizeProduct);
        showPos_SizeProductGrid();
        lblMsg.Text = "Added Successfully";
        lblMsg.ForeColor = System.Drawing.Color.Green;

        //Response.Redirect("AdminPos_SizeProductDisplay.aspx");
    }
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        Pos_SizeProduct pos_SizeProduct = new Pos_SizeProduct();

        pos_SizeProduct.Pos_SizeID = Int32.Parse(ddlPos_Size.SelectedValue);
        pos_SizeProduct.ProductID  = Int32.Parse(ddlProduct.SelectedValue);
        int resutl = Pos_SizeProductManager.InsertPos_SizeProduct(pos_SizeProduct);

        showPos_SizeProductGrid();
        lblMsg.Text      = "Added Successfully";
        lblMsg.ForeColor = System.Drawing.Color.Green;

        //Response.Redirect("AdminPos_SizeProductDisplay.aspx");
    }
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        Pos_SizeProduct pos_SizeProduct = new Pos_SizeProduct();

        pos_SizeProduct = Pos_SizeProductManager.GetPos_SizeProductByID(Int32.Parse(Request.QueryString["pos_SizeProductID"]));
        Pos_SizeProduct tempPos_SizeProduct = new Pos_SizeProduct();

        tempPos_SizeProduct.Pos_SizeProductID = pos_SizeProduct.Pos_SizeProductID;

        tempPos_SizeProduct.Pos_SizeID = Int32.Parse(ddlPos_Size.SelectedValue);
        tempPos_SizeProduct.ProductID  = Int32.Parse(ddlProduct.SelectedValue);
        bool result = Pos_SizeProductManager.UpdatePos_SizeProduct(tempPos_SizeProduct);

        Response.Redirect("AdminPos_SizeProductDisplay.aspx");
    }
示例#10
0
    public bool UpdatePos_SizeProduct(Pos_SizeProduct pos_SizeProduct)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("GP_UpdatePos_SizeProduct", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@Pos_SizeProductID", SqlDbType.Int).Value = pos_SizeProduct.Pos_SizeProductID;
            cmd.Parameters.Add("@Pos_SizeID", SqlDbType.Int).Value        = pos_SizeProduct.Pos_SizeID;
            cmd.Parameters.Add("@ProductID", SqlDbType.Int).Value         = pos_SizeProduct.ProductID;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return(result == 1);
        }
    }
示例#11
0
    public int InsertPos_SizeProduct(Pos_SizeProduct pos_SizeProduct)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("GP_InsertPos_SizeProduct", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@Pos_SizeProductID", SqlDbType.Int).Direction = ParameterDirection.Output;
            cmd.Parameters.Add("@Pos_SizeID", SqlDbType.Int).Value            = pos_SizeProduct.Pos_SizeID;
            cmd.Parameters.Add("@ProductID", SqlDbType.Int).Value             = pos_SizeProduct.ProductID;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return((int)cmd.Parameters["@Pos_SizeProductID"].Value);
        }
    }
示例#12
0
 public Pos_SizeProduct GetPos_SizeProductFromReader(IDataReader reader)
 {
     try
     {
         Pos_SizeProduct pos_SizeProduct = new Pos_SizeProduct
             (
                 (int)reader["Pos_SizeProductID"],
                 (int)reader["Pos_SizeID"],
                 (int)reader["ProductID"]
             );
          return pos_SizeProduct;
     }
     catch(Exception ex)
     {
         return null;
     }
 }
示例#13
0
 public Pos_SizeProduct GetPos_SizeProductFromReader(IDataReader reader)
 {
     try
     {
         Pos_SizeProduct pos_SizeProduct = new Pos_SizeProduct
                                           (
             (int)reader["Pos_SizeProductID"],
             (int)reader["Pos_SizeID"],
             (int)reader["ProductID"]
                                           );
         return(pos_SizeProduct);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
示例#14
0
    public bool UpdatePos_SizeProduct(Pos_SizeProduct pos_SizeProduct)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("GP_UpdatePos_SizeProduct", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@Pos_SizeProductID", SqlDbType.Int).Value = pos_SizeProduct.Pos_SizeProductID;
            cmd.Parameters.Add("@Pos_SizeID", SqlDbType.Int).Value = pos_SizeProduct.Pos_SizeID;
            cmd.Parameters.Add("@ProductID", SqlDbType.Int).Value = pos_SizeProduct.ProductID;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return result == 1;
        }
    }
示例#15
0
    public int InsertPos_SizeProduct(Pos_SizeProduct pos_SizeProduct)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("GP_InsertPos_SizeProduct", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@Pos_SizeProductID", SqlDbType.Int).Direction = ParameterDirection.Output;
            cmd.Parameters.Add("@Pos_SizeID", SqlDbType.Int).Value = pos_SizeProduct.Pos_SizeID;
            cmd.Parameters.Add("@ProductID", SqlDbType.Int).Value = pos_SizeProduct.ProductID;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return (int)cmd.Parameters["@Pos_SizeProductID"].Value;
        }
    }
示例#16
0
    public static int InsertPos_SizeProduct(Pos_SizeProduct pos_SizeProduct)
    {
        SqlPos_SizeProductProvider sqlPos_SizeProductProvider = new SqlPos_SizeProductProvider();

        return(sqlPos_SizeProductProvider.InsertPos_SizeProduct(pos_SizeProduct));
    }
示例#17
0
    public static bool UpdatePos_SizeProduct(Pos_SizeProduct pos_SizeProduct)
    {
        SqlPos_SizeProductProvider sqlPos_SizeProductProvider = new SqlPos_SizeProductProvider();

        return(sqlPos_SizeProductProvider.UpdatePos_SizeProduct(pos_SizeProduct));
    }
    private void showPos_SizeProductData()
    {
        Pos_SizeProduct pos_SizeProduct = new Pos_SizeProduct();
        pos_SizeProduct = Pos_SizeProductManager.GetPos_SizeProductByID(Int32.Parse(Request.QueryString["pos_SizeProductID"]));

        ddlPos_Size.SelectedValue = pos_SizeProduct.Pos_SizeID.ToString();
        ddlProduct.SelectedValue = pos_SizeProduct.ProductID.ToString();
    }
示例#19
0
 public static bool UpdatePos_SizeProduct(Pos_SizeProduct pos_SizeProduct)
 {
     SqlPos_SizeProductProvider sqlPos_SizeProductProvider = new SqlPos_SizeProductProvider();
     return sqlPos_SizeProductProvider.UpdatePos_SizeProduct(pos_SizeProduct);
 }
示例#20
0
 public static int InsertPos_SizeProduct(Pos_SizeProduct pos_SizeProduct)
 {
     SqlPos_SizeProductProvider sqlPos_SizeProductProvider = new SqlPos_SizeProductProvider();
     return sqlPos_SizeProductProvider.InsertPos_SizeProduct(pos_SizeProduct);
 }