protected void AllSize_Transferred(object sender, RadListBoxTransferredEventArgs e)
    {
        var    DestinationListBox = e.DestinationListBox;
        string ProductID;

        ProductID = Request.QueryString["pi"];
        var oProductSizeColor = new ProductSizeColor();
        IList <RadListBoxItem> rlbicProductColor = lstChoosedColor.SelectedItems;

        foreach (RadListBoxItem item in e.Items)
        {
            if (DestinationListBox.ID == "lstAllSize")
            {
                string ProSizeID;
                ProSizeID = item.Value.ToString();
                //Update ProductFormSize Status
                var dv = oProductSizeColor.ProductSizeColorSelectOne(ProSizeID).DefaultView;
                if (dv.Table.Rows.Count > 0)
                {
                    oProductSizeColor.ProductSizeColorDelete1(ProSizeID, "False");
                }
            }
            else if (DestinationListBox.ID == "lstChoosedSize")
            {
                //Insert ProductFormSize
                var    selectedItem  = e.DestinationListBox.FindItemByValue(item.Value);
                string ProductSizeID = item.Value.ToString();
                var    dv            = oProductSizeColor.ProductSizeColorSelectAll("", ProductSizeID, ProductID, "", "True", "", "").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")
                    {
                        oProductSizeColor.ProductSizeColorDelete1(ProductSizeID, "True");
                    }
                    if (lblName != null)
                    {
                        lblName.Text = item.Text;
                    }
                    if (dv[0]["Priority"] != DBNull.Value)
                    {
                        txtPriority.Value = Convert.ToInt32(dv[0]["Priority"]);
                    }
                }
                else
                {
                    foreach (RadListBoxItem item1 in rlbicProductColor)
                    {
                        var ProductOptionCategoryID = item1.Value.ToString();
                        oProductSizeColor.ProductSizeColorInsert(ProductSizeID, ProductOptionCategoryID,
                                                                 ProductID, "True", "True", "");
                    }
                }
            }
        }
        DataBindListBoxSize();
    }
    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();
    }
示例#3
0
        protected void rlbPeriodosDisponibles_Transferred(object sender, RadListBoxTransferredEventArgs e)
        {
            if (e.SourceListBox.ID == "rlbPeriodosDisponibles")
            {
                List <int> oLista = e.Items.Select(t => int.Parse(t.Value)).ToList();
                ContextoReportes.oReporteComparativo.Where(t => t.vIdReporteComparativo == vIdReporteComparativo).FirstOrDefault().vListaPeriodos.AddRange(oLista);
            }

            if (e.SourceListBox.ID == "rlbPeriodosComparar")
            {
                List <int> oLista = e.Items.Select(t => int.Parse(t.Value)).ToList();
                foreach (int item in oLista)
                {
                    ContextoReportes.oReporteComparativo.Where(t => t.vIdReporteComparativo == vIdReporteComparativo).FirstOrDefault().vListaPeriodos.Remove(item);
                }
            }
        }
    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 From_Joints_Transferred(object sender, RadListBoxTransferredEventArgs e)
    {
        if (e.Items.Count >= 1 && e.SourceListBox.ClientID.Contains("From_Joints"))
        {
            DataTable jntsDT = Session["JNTSDataTable"] as DataTable;
            foreach (RadListBoxItem item in e.Items)
            {
                DataRow dr = jntsDT.Select("JOINT_ID=" + item.Value).First();

                dr["RT1_RQSTD"] = 1;
            }


            //FUNCTION CALL
            DataTable line_Status_DT = get_Line_Status(jntsDT, int.Parse(Request.QueryString["NDE_TYPE_ID"].ToString()));
            //FUNCTION CALL

            lineGrid.DataSource = line_Status_DT;
            lineGrid.DataBind();
            lineGrid.Rebind();
        }
        if (e.Items.Count >= 1 && e.SourceListBox.ClientID.Contains("To_Joints"))
        {
            DataTable jntsDT = Session["JNTSDataTable"] as DataTable;
            foreach (RadListBoxItem item in e.Items)
            {
                DataRow dr = jntsDT.Select("JOINT_ID=" + item.Value).First();

                dr["RT1_RQSTD"] = 0;
            }


            //FUNCTION CALL
            DataTable line_Status_DT = get_Line_Status(jntsDT, int.Parse(Request.QueryString["NDE_TYPE_ID"].ToString()));
            //FUNCTION CALL

            lineGrid.DataSource = line_Status_DT;
            lineGrid.DataBind();
            lineGrid.Rebind();
        }
    }
        protected void RadListBoxSource_OnTransferred(object sender, RadListBoxTransferredEventArgs e)
        {
            if (ddlBranches.SelectedValue == "0")
            {
                ShowErrorMessage("Please select a branch from the dropdown.");
                return;
            }
            var itemIds = new List <int>();

            foreach (var radListBoxItem in e.Items)
            {
                itemIds.Add(int.Parse(radListBoxItem.Value));
            }

            foreach (var itemId in itemIds)
            {
                var result = ProductOperations.AssignAProductToAStore(int.Parse(ddlBranches.SelectedValue), itemId);
                if (!result.IsSuccess)
                {
                    ShowErrorMessage("A problem occured while assigning one or more of the products.");
                }
            }
        }
    protected void AllColor_Transferred(object sender, RadListBoxTransferredEventArgs e)
    {
        //var DestinationListBox = e.DestinationListBox;
        //string ProductID;
        //ProductID = Request.QueryString["PI"].ToString();
        //var dv1 = new Product_Color();
        //foreach (RadListBoxItem item in e.Items)
        //{
        //    if (DestinationListBox.ID == "lstAllColor")
        //    {
        //        string ProColorID;
        //        ProColorID = item.Value.ToString();
        //        //Update ProductFormSize Status
        //        var dv = new Product_Color().Product_ColorSelectOne(ProColorID).DefaultView;
        //        if (dv.Table.Rows.Count > 0)
        //        {
        //            dv1.Product_ColorDelete(ProColorID, "", "", "false");
        //        }
        //    }
        //    else if (DestinationListBox.ID == "lstChoosedColor")
        //    {
        //        //Insert ProductFormSize
        //        var selectedItem = e.DestinationListBox.FindItemByValue(item.Value);
        //        string ProductColorID = item.Value.ToString();
        //        var dv = new Product_Color().Product_ColorSelectAll(ProductID, ProductColorID, "", "", "").DefaultView;
        //        var lblColorCode = (Label)selectedItem.FindControl("lblColorCode");
        //        var lblColorName = (Label)selectedItem.FindControl("lblColorName");
        //        var chkIsShow = (CheckBox)selectedItem.FindControl("chkIsShow");
        //        var txtPriority = (RadNumericTextBox)selectedItem.FindControl("txtPriority");

        //        if (dv.Table.Rows.Count > 0)
        //        {
        //            if (dv[0]["IsAvailable"].ToString() != "True")
        //            {
        //                dv1.Product_ColorDelete(dv[0]["ProColorID"].ToString(), "", "", "true");
        //            }
        //            if (lblColorName != null)
        //            {
        //                lblColorName.Text = item.Text;
        //            }
        //            if (dv[0]["ProductColorCode"] != "")
        //            {
        //                lblColorCode.Text = dv[0]["ProductColorCode"].ToString();
        //            }
        //            if (dv[0]["ProductColorName"] != "")
        //            {
        //                lblColorName.Text = dv[0]["ProductColorName"].ToString();
        //            }
        //            if (dv[0]["Priority"] != DBNull.Value)
        //            {
        //                txtPriority.Value = Convert.ToInt32(dv[0]["Priority"]);
        //            }
        //        }
        //        else
        //        {
        //            dv1.Product_ColorInsert(ProductID.ToString(), ProductColorID.ToString(), "false", "0", "true");
        //        }
        //    }
        //}
        //DataBindListBoxColor();
    }
 protected void rlbMappedSchemes_Transferred(object sender, RadListBoxTransferredEventArgs e)
 {
     lblMappedSchemes.Text = "Mapped Schemes(" + rlbMappedSchemes.Items.Count.ToString() + ")";
 }
 protected void rlbAvailSchemes_Transferred(object sender, RadListBoxTransferredEventArgs e)
 {
     lblAvailableSchemes.Text = "Available Schemes(" + rlbAvailSchemes.Items.Count.ToString() + ")";
 }
 protected void ListBoxSource_Transferred(object sender, RadListBoxTransferredEventArgs e)
 {
 }
    protected void AllColor_Transferred(object sender, RadListBoxTransferredEventArgs e)
    {
        //var DestinationListBox = e.DestinationListBox;
        //string ProductID;
        //ProductID = Request.QueryString["PI"].ToString();
        //var dv1 = new Product_Color();
        //foreach (RadListBoxItem item in e.Items)
        //{
        //    if (DestinationListBox.ID == "lstAllColor")
        //    {
        //        string ProColorID;
        //        ProColorID = item.Value.ToString();
        //        //Update ProductFormSize Status
        //        var dv = new Product_Color().Product_ColorSelectOne(ProColorID).DefaultView;
        //        if (dv.Table.Rows.Count > 0)
        //        {
        //            dv1.Product_ColorDelete(ProColorID, "", "", "false");
        //        }
        //    }
        //    else if (DestinationListBox.ID == "lstChoosedColor")
        //    {
        //        //Insert ProductFormSize 
        //        var selectedItem = e.DestinationListBox.FindItemByValue(item.Value);
        //        string ProductColorID = item.Value.ToString();
        //        var dv = new Product_Color().Product_ColorSelectAll(ProductID, ProductColorID, "", "", "").DefaultView;
        //        var lblColorCode = (Label)selectedItem.FindControl("lblColorCode");
        //        var lblColorName = (Label)selectedItem.FindControl("lblColorName");
        //        var chkIsShow = (CheckBox)selectedItem.FindControl("chkIsShow");
        //        var txtPriority = (RadNumericTextBox)selectedItem.FindControl("txtPriority");

        //        if (dv.Table.Rows.Count > 0)
        //        {
        //            if (dv[0]["IsAvailable"].ToString() != "True")
        //            {
        //                dv1.Product_ColorDelete(dv[0]["ProColorID"].ToString(), "", "", "true");
        //            }
        //            if (lblColorName != null)
        //            {
        //                lblColorName.Text = item.Text;
        //            }
        //            if (dv[0]["ProductColorCode"] != "")
        //            {
        //                lblColorCode.Text = dv[0]["ProductColorCode"].ToString();
        //            }
        //            if (dv[0]["ProductColorName"] != "")
        //            {
        //                lblColorName.Text = dv[0]["ProductColorName"].ToString();
        //            }
        //            if (dv[0]["Priority"] != DBNull.Value)
        //            {
        //                txtPriority.Value = Convert.ToInt32(dv[0]["Priority"]);
        //            }
        //        }
        //        else
        //        {
        //            dv1.Product_ColorInsert(ProductID.ToString(), ProductColorID.ToString(), "false", "0", "true");
        //        }
        //    }
        //}
        //DataBindListBoxColor();
    }
    protected void AllSize_Transferred(object sender, RadListBoxTransferredEventArgs e)
    {
        var DestinationListBox = e.DestinationListBox;
        string ProductID;
        ProductID = Request.QueryString["pi"];
        var oProductSizeColor = new ProductSizeColor();
        IList<RadListBoxItem> rlbicProductColor = lstChoosedColor.SelectedItems;

        foreach (RadListBoxItem item in e.Items)
        {
            if (DestinationListBox.ID == "lstAllSize")
            {
                string ProSizeID;
                ProSizeID = item.Value.ToString();
                //Update ProductFormSize Status
                var dv = oProductSizeColor.ProductSizeColorSelectOne(ProSizeID).DefaultView;
                if (dv.Table.Rows.Count > 0)
                {
                    oProductSizeColor.ProductSizeColorDelete1(ProSizeID, "False");
                }
            }
            else if (DestinationListBox.ID == "lstChoosedSize")
            {
                //Insert ProductFormSize 
                var selectedItem = e.DestinationListBox.FindItemByValue(item.Value);
                string ProductSizeID = item.Value.ToString();
                var dv = oProductSizeColor.ProductSizeColorSelectAll("", ProductSizeID, ProductID, "", "True", "", "").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")
                        oProductSizeColor.ProductSizeColorDelete1(ProductSizeID, "True");
                    if (lblName != null)
                        lblName.Text = item.Text;
                    if (dv[0]["Priority"] != DBNull.Value)
                        txtPriority.Value = Convert.ToInt32(dv[0]["Priority"]);
                }
                else
                {
                    foreach (RadListBoxItem item1 in rlbicProductColor)
                    {
                        var ProductOptionCategoryID = item1.Value.ToString();
                        oProductSizeColor.ProductSizeColorInsert(ProductSizeID, ProductOptionCategoryID,
                                                                 ProductID, "True", "True", "");
                    }
                }
            }

        }
        DataBindListBoxSize();
    }
 void RadListBox1_Transferred(object sender, RadListBoxTransferredEventArgs e)
 {
     foreach (RadListBoxItem item in e.Items)
     {
         item.DataBind();
     }
 }
示例#14
0
 void box_Transferred(object sender, RadListBoxTransferredEventArgs e)
 {
     ChangeItemsDisabled(e.Items);
 }