protected void AllSize_Transferred(object sender, RadListBoxTransferredEventArgs e)
    {
        var DestinationListBox = e.DestinationListBox;
        string ProductID;
        ProductID = Request.QueryString["pi"];
        var oProductOfLength = new ProductOfLength();
        foreach (RadListBoxItem item in e.Items)
        {
            if (DestinationListBox.ID == "lstAllSize")
            {
                string ProSizeID;
                ProSizeID = item.Value.ToString();
                //Update ProductFormSize Status
                //var dv = new Product_Size().Product_SizeSelectAll(ProductID, SizeID, "", "", "", "", "").DefaultView;
                var dv = oProductOfLength.ProductOfLengthSelectOne(ProSizeID).DefaultView;
                if (dv.Table.Rows.Count > 0)
                {
                    oProductOfLength.ProductOfLengthDelete(ProSizeID);
                }
            }
            else if (DestinationListBox.ID == "lstChoosedSize")
            {
                //Insert ProductFormSize 
                var selectedItem = e.DestinationListBox.FindItemByValue(item.Value);
                string ProductSizeID = item.Value;
                var dv = oProductOfLength.ProductOfLengthSelectAll("", "", "True", ProductID, ProductSizeID).DefaultView;
                var lblName = (Label)selectedItem.FindControl("lblName");
                var txtPriority = (RadNumericTextBox)selectedItem.FindControl("txtPriority");

                if (dv.Table.Rows.Count > 0)
                {
                    //if (dv[0]["IsAvailable"].ToString() != "True")
                    //{
                    //    oProductOfLength.ProductOfLengthQuickUpdate(dv[0]["ProductOfLengthID"].ToString(), "true", "");
                    //}
                    if (lblName != null)
                        lblName.Text = item.Text;
                    if (dv[0]["Priority"] != DBNull.Value)
                        txtPriority.Value = Convert.ToInt32(dv[0]["Priority"]);
                }
                else
                    oProductOfLength.ProductOfLengthInsert("True", txtPriority.Text, ProductID.ToString(), ProductSizeID.ToString());
            }
        }
        DataBindListBoxSize();
    }
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        string Priority, ProductOfLengthID, IsAvailable;
        var oProductOfLength = new ProductOfLength();
        RadListBoxItemCollection choosesizes = lstChoosedSize.Items;

        foreach (RadListBoxItem item in choosesizes)
        {
            ProductOfLengthID = item.Value.ToString();
            Priority = ((RadNumericTextBox)item.FindControl("txtPriority")).Text.Trim();
            IsAvailable = ((CheckBox)item.FindControl("chkIsAvailable")).Checked.ToString();

            oProductOfLength.ProductOfLengthQuickUpdate(
                ProductOfLengthID,
                IsAvailable,
                Priority
            );
        }
    }