Example #1
0
        protected void grdImportView_RowDataBound(object sender, Obout.Grid.GridRowEventArgs e)
        {
            string prodcode    = e.Row.Cells[7].Text;
            string Vendorname  = e.Row.Cells[8].Text;
            string SOavailable = e.Row.Cells[9].Text;

            try
            {
                //if (prodcode == "NotAvailable" || Vendorname == "NotAvailable" || SOavailable == "Available")
                //{
                //    e.Row.BackColor = System.Drawing.Color.DarkCyan;
                //    e.Row.ForeColor = System.Drawing.Color.White;
                //    value = "NotAvailable";
                //    if (prodcode == "NotAvailable")
                //    {
                //        e.Row.Cells[3].ForeColor = System.Drawing.Color.White;
                //        e.Row.Cells[3].ToolTip = "Product not available";
                //    }
                //    if (Vendorname == "NotAvailable")
                //    {
                //        e.Row.Cells[4].ForeColor = System.Drawing.Color.White;
                //        e.Row.Cells[4].ToolTip = "Customer Not Available";
                //    }
                //    if (SOavailable == "Available")
                //    {
                //        e.Row.Cells[1].ForeColor = System.Drawing.Color.White;
                //        e.Row.Cells[1].ToolTip = "SoNumber Allready Available";
                //    }
                //}
            }
            catch { }
            finally { }
        }
Example #2
0
        protected void gridGalleria_RowDataBound(object sender, Obout.Grid.GridRowEventArgs e)
        {
            var row = (DataRowView)e.Row.DataItem;
            //var categoria = (BLL.BOAM.GalleriaCategoria)row.Row.ItemArray[row.Row.Table.Columns["AggregatedGalleriaCategoria"].Ordinal];
            var uid = (int)row.Row.ItemArray[row.Row.Table.Columns["UId"].Ordinal];
            var bo  = presenter.GetGalleria(uid);

            e.Row.Cells[1].Text = bo.AggregatedGalleriaCategoria.Nome;
        }
        protected void GVImportView_OnRowDataBound(object sender, Obout.Grid.GridRowEventArgs e)
        {
            //  if (DataBinder.Eval(e.Row.DataItem, "Remark") != null)
            string Remark = e.Row.Cells[GVImportView.Columns["Remark"].Index].Text;

            if (Remark != "")
            {
                e.Row.BackColor = System.Drawing.Color.Cyan;
                Validate        = "False";
            }
        }
 protected void ogridSMS_OnRowDataBound(object sender, Obout.Grid.GridRowEventArgs e)
 {
     if (e.Row.RowType == Obout.Grid.GridRowType.DataRow)
     {
         string txt = e.Row.Cells[4].Text;
         bool   b1  = txt.Contains("Valid");
         bool   b2  = txt.Contains("Checked");
         if (txt.Contains("Valid") && txt.Contains("Checked"))
         {
             e.Row.Cells[4].BackColor = Color.MediumPurple;
         }
     }
 }
        protected void Grid1_RowCommand(object sender, Obout.Grid.GridRowEventArgs e)
        {
            iPartRequestClient objService = new iPartRequestClient();
            CustomProfile      profile    = CustomProfile.GetProfile();

            try
            {
                Obout.Grid.GridDataControlFieldCell cell = e.Row.Cells[6] as Obout.Grid.GridDataControlFieldCell;
                DropDownList ddl = cell.FindControl("ddlUOM") as DropDownList;

                ddl.Attributes.Add("onchange", "javascript:GetIndex('" + ddl.SelectedIndex + "'," + e.Row.RowIndex + ")");
            }
            catch (System.Exception ex)
            {
                Login.Profile.ErrorHandling(ex, this, "Request Template", "Grid1_RowCommand");
            }
            finally { objService.Close(); }
        }
        // add by suresh =====>
        protected void Grid1_RowDataBound(object sender, Obout.Grid.GridRowEventArgs e)
        {
            try
            {
                // if (e.Row.RowType == DataControlRowType.DataRow)
                //if (Obout.Grid.GridRowType == DataControlRowType.DataRow)
                // {
                ImageButton imgbtndetails = (ImageButton)e.Row.Cells[0].FindControl("imgbtndetails");

                if (e.Row.Cells[11].Text == "False")
                {
                    imgbtndetails.Visible = false;
                    imgbtndetails.Enabled = false;
                }
                else
                {
                    imgbtndetails.Visible = true;
                    imgbtndetails.Enabled = true;
                }
                //}
            }
            catch { }
            finally { }
        }
Example #7
0
        protected void GVImportView_OnRowDataBound(object sender, Obout.Grid.GridRowEventArgs e)
        {
            try
            {
                decimal price       = 0m;
                string  ProductCode = e.Row.Cells[6].Text;
                if (e.Row.Cells[5].Text != "")
                {
                    price = decimal.Parse(e.Row.Cells[5].Text);
                }
                else
                {
                    e.Row.BackColor          = System.Drawing.Color.DarkCyan;
                    e.Row.ForeColor          = System.Drawing.Color.White;
                    e.Row.Cells[5].BackColor = System.Drawing.Color.Tomato;
                    e.Row.Cells[5].ToolTip   = "Price Should not be blank or Charecters";
                    value = 2;
                }

                if (ProductCode == "NotAvailable")
                {
                    value                    = 0;
                    e.Row.BackColor          = System.Drawing.Color.DarkCyan;
                    e.Row.ForeColor          = System.Drawing.Color.White;
                    e.Row.Cells[1].BackColor = System.Drawing.Color.Tomato;
                    e.Row.Cells[1].ToolTip   = "SKU not available";
                }
            }
            catch (Exception ex)
            {
                value            = 2;
                btnnext.Enabled  = false;
                btnnext.CssClass = "class1";
                ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Only Numbers are allowed in Price columns');", true);
            }
        }
Example #8
0
        protected void Grid1_OnRowDataBound(object sender, Obout.Grid.GridRowEventArgs e)
        {
            BrilliantWMS.WMSInbound.iInboundClient Inbound = new WMSInbound.iInboundClient();
            CustomProfile profile = CustomProfile.GetProfile();

            try
            {
                if (e.Row.RowType == Obout.Grid.GridRowType.DataRow)
                {
                    Obout.Grid.GridDataControlFieldCell cell = e.Row.Cells[7] as Obout.Grid.GridDataControlFieldCell;
                    DropDownList ddl       = cell.FindControl("ddlUOM") as DropDownList;
                    HiddenField  hdnUOM    = cell.FindControl("hdnMyUOM") as HiddenField;
                    Label        rowQtySpn = e.Row.Cells[9].FindControl("rowQtyTotal") as Label;
                    TextBox      txtUsrQty = e.Row.Cells[6].FindControl("txtUsrQty") as TextBox;

                    int     ProdID    = Convert.ToInt32(e.Row.Cells[0].Text);
                    decimal CrntStock = Convert.ToDecimal(e.Row.Cells[5].Text);

                    //TextBox txtReturnQty = e.Row.Cells[10].FindControl("txtReturnQty") as TextBox;
                    DataSet dsUOM = new DataSet();
                    dsUOM = Inbound.GetUOMofSelectedProduct(ProdID, profile.DBConnection._constr);

                    ddl.DataSource     = dsUOM;
                    ddl.DataTextField  = "Description";
                    ddl.DataValueField = "UMOGroup";
                    ddl.DataBind();
                    if (Convert.ToInt64(HttpContext.Current.Session["TRID"].ToString()) > 0)
                    {
                        //txtUsrQty.Text = Convert.ToString(UserQty / SelectedQty);
                        UCProductSearchWTW.Visible = false;
                        txtUsrQty.Enabled          = false;
                        ddl.Enabled = false;
                    }
                    else
                    {
                        ddl.SelectedIndex = 0;

                        decimal SelectedQty = decimal.Parse(dsUOM.Tables[0].Rows[0]["Quantity"].ToString());
                        decimal SelectedUOM = decimal.Parse(dsUOM.Tables[0].Rows[0]["UOMID"].ToString());

                        decimal rowQty = decimal.Parse(txtUsrQty.Text.ToString());
                        decimal UsrQty = SelectedQty * rowQty;

                        hdnSelectedQty.Value = SelectedQty.ToString();
                        rowQtySpn.Text       = UsrQty.ToString();

                        if (UsrQty > CrntStock)
                        {
                            rowQtySpn.Text = "0";
                        }
                        else
                        {
                            rowQtySpn.Text = UsrQty.ToString();
                            //Price = decimal.Parse(rowQtySpn.Text.ToString()) * decimal.Parse(txtUsrPrice.Text.ToString());
                            //rowPriceTotal.Text = Price.ToString();
                        }
                        ddl.Attributes.Add("onchange", "javascript:GetIndex(this,'" + hdnUOM.ClientID.ToString() + "','" + rowQtySpn.ClientID.ToString() + "','" + txtUsrQty.ClientID.ToString() + "'," + CrntStock + "," + e.Row.RowIndex + ")");
                        txtUsrQty.Attributes.Add("onblur", "javascript:GetIndexQty(this," + SelectedQty + "," + SelectedUOM + ",'" + rowQtySpn.ClientID.ToString() + "','" + txtUsrQty.ClientID.ToString() + "'," + CrntStock + "," + e.Row.RowIndex + ")");
                    }
                }
            }
            catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, this, "WToWTransferDetail.aspx", "Grid1_OnRowDataBound"); }
            finally { Inbound.Close(); }
        }
        protected void GVImportView_OnRowDataBound(object sender, Obout.Grid.GridRowEventArgs e)
        {
            try
            {
                decimal price        = 0m;
                long    CurrentStock = 0;
                string  ProductCode  = e.Row.Cells[12].Text;
                string  ProdDept     = e.Row.Cells[13].Text;
                string  Department   = e.Row.Cells[14].Text;
                string  Location     = e.Row.Cells[15].Text;


                long MOQchk = long.Parse(e.Row.Cells[17].Text);
                if (e.Row.Cells[10].Text != "")
                {
                    price = decimal.Parse(e.Row.Cells[10].Text);
                }
                else
                {
                    e.Row.BackColor           = System.Drawing.Color.DarkCyan;
                    e.Row.ForeColor           = System.Drawing.Color.White;
                    e.Row.Cells[10].BackColor = System.Drawing.Color.Tomato;
                    e.Row.Cells[10].ToolTip   = "Price Should not be blank or Charecters";
                    value = 2;
                }

                if (e.Row.Cells[7].Text != "" && double.Parse(e.Row.Cells[7].Text) != 0.00)
                {
                    CurrentStock = long.Parse(e.Row.Cells[16].Text);
                }
                else
                {
                    e.Row.BackColor          = System.Drawing.Color.DarkCyan;
                    e.Row.ForeColor          = System.Drawing.Color.White;
                    e.Row.Cells[7].BackColor = System.Drawing.Color.Tomato;
                    e.Row.Cells[7].ToolTip   = "Quantity Should not be blank, Zero or Charecters";
                    value = 6;
                }

                if (ProductCode == "NotAvailable")
                {
                    value                    = 0;
                    e.Row.BackColor          = System.Drawing.Color.DarkCyan;
                    e.Row.ForeColor          = System.Drawing.Color.White;
                    e.Row.Cells[1].BackColor = System.Drawing.Color.Tomato;
                    e.Row.Cells[1].ToolTip   = "SKU not available";
                }
                if (long.Parse(e.Row.Cells[16].Text) == 0)
                {
                    value                    = 4;
                    e.Row.BackColor          = System.Drawing.Color.DarkCyan;
                    e.Row.ForeColor          = System.Drawing.Color.White;
                    e.Row.Cells[5].BackColor = System.Drawing.Color.Tomato;
                    e.Row.Cells[5].ToolTip   = "Current Stock is Less than requested Qty";
                }
                if (MOQchk == 1)
                {
                    value                    = 5;
                    e.Row.BackColor          = System.Drawing.Color.DarkCyan;
                    e.Row.ForeColor          = System.Drawing.Color.White;
                    e.Row.Cells[4].BackColor = System.Drawing.Color.Tomato;
                    e.Row.Cells[4].ToolTip   = "Requested Qty is not according to MOQ";
                    e.Row.Cells[7].BackColor = System.Drawing.Color.Tomato;
                    e.Row.Cells[7].ToolTip   = "Requested Qty is not according to MOQ";
                }
                if (ProdDept == "NotInDepartment")
                {
                    value                    = 7;
                    e.Row.BackColor          = System.Drawing.Color.DarkCyan;
                    e.Row.ForeColor          = System.Drawing.Color.White;
                    e.Row.Cells[1].BackColor = System.Drawing.Color.Tomato;
                    e.Row.Cells[1].ToolTip   = "SKU not available in Given Department";
                }
                if (Department == "NotAvailable")
                {
                    value                     = 8;
                    e.Row.BackColor           = System.Drawing.Color.DarkCyan;
                    e.Row.ForeColor           = System.Drawing.Color.White;
                    e.Row.Cells[18].BackColor = System.Drawing.Color.Tomato;
                    e.Row.Cells[18].ToolTip   = "Department Not Available";
                }
                if (Location == "NotAvailable")
                {
                    value                     = 9;
                    e.Row.BackColor           = System.Drawing.Color.DarkCyan;
                    e.Row.ForeColor           = System.Drawing.Color.White;
                    e.Row.Cells[19].BackColor = System.Drawing.Color.Tomato;
                    e.Row.Cells[19].ToolTip   = "Location Not Available";
                }
            }
            catch (Exception ex)
            {
                value            = 2;
                btnnext.Enabled  = false;
                btnnext.CssClass = "class1";
                ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Only Numbers are allowed in Price columns');", true);
            }
        }
        protected void Grid1_OnRowDataBound(object sender, Obout.Grid.GridRowEventArgs e)
        {
            iPartRequestClient objService = new iPartRequestClient();
            CustomProfile      profile    = CustomProfile.GetProfile();

            try
            {
                if (e.Row.RowType == Obout.Grid.GridRowType.DataRow)
                {
                    //Obout.Grid.GridDataControlFieldCell cell = e.Row.Cells[6] as Obout.Grid.GridDataControlFieldCell;
                    //Obout.Grid.GridDataControlFieldCell cell = e.Row.Cells[7] as Obout.Grid.GridDataControlFieldCell;
                    Obout.Grid.GridDataControlFieldCell cell = e.Row.Cells[8] as Obout.Grid.GridDataControlFieldCell;

                    DropDownList ddl    = cell.FindControl("ddlUOM") as DropDownList;
                    HiddenField  hdnUOM = cell.FindControl("hdnMyUOM") as HiddenField;
                    //Label rowQtySpn = e.Row.Cells[9].FindControl("rowQtyTotal") as Label;
                    Label rowQtySpn = e.Row.Cells[10].FindControl("rowQtyTotal") as Label;

                    //TextBox txtUsrQty = e.Row.Cells[6].FindControl("txtUsrQty") as TextBox;
                    TextBox txtUsrQty = e.Row.Cells[7].FindControl("txtUsrQty") as TextBox;

                    int     ProdID = Convert.ToInt32(e.Row.Cells[0].Text);
                    decimal moq    = Convert.ToDecimal(e.Row.Cells[6].Text);

                    TextBox txtUsrPrice   = e.Row.Cells[11].FindControl("txtUsrPrice") as TextBox;
                    Label   rowPriceTotal = e.Row.Cells[12].FindControl("rowPriceTotal") as Label;

                    DataSet dsUOM = new DataSet();
                    dsUOM = objService.GetUOMofSelectedProduct(ProdID, profile.DBConnection._constr);

                    ddl.DataSource     = dsUOM;
                    ddl.DataTextField  = "Description";
                    ddl.DataValueField = "UMOGroup";
                    ddl.DataBind();

                    decimal SelectedQty = 0, SelectedUOM = 0;
                    decimal Price = decimal.Parse(txtUsrPrice.Text.ToString());

                    //ddl.SelectedValue = e.Row.Cells[6].Text;
                    if (hdnTemplateID.Value != "")
                    {
                        long   TemplID     = Convert.ToInt64(hdnTemplateID.Value);
                        string selectedUom = objService.GetSelectedUomTemplate(TemplID, ProdID, profile.DBConnection._constr);
                        ddl.SelectedIndex  = ddl.Items.IndexOf(ddl.Items.FindByValue(selectedUom.ToString()));
                        rowQtySpn.Text     = txtUsrQty.Text;
                        rowPriceTotal.Text = e.Row.Cells[12].Text;
                    }
                    else
                    {
                        ddl.SelectedIndex = 2;

                        SelectedQty = decimal.Parse(dsUOM.Tables[0].Rows[2]["Quantity"].ToString());
                        SelectedUOM = decimal.Parse(dsUOM.Tables[0].Rows[2]["UOMID"].ToString());
                        decimal rowQty = decimal.Parse(txtUsrQty.Text.ToString());
                        decimal UsrQty = SelectedQty * rowQty;

                        hdnSelectedQty.Value = SelectedQty.ToString();
                        rowQtySpn.Text       = UsrQty.ToString();
                    }

                    ddl.Attributes.Add("onchange", "javascript:GetIndex(this,'" + hdnUOM.ClientID.ToString() + "','" + rowQtySpn.ClientID.ToString() + "','" + txtUsrQty.ClientID.ToString() + "'," + e.Row.RowIndex + "," + Price + ",'" + rowPriceTotal.ClientID.ToString() + "'," + moq + ")");

                    txtUsrQty.Attributes.Add("onblur", "javascript:GetIndexQty(this," + SelectedQty + "," + SelectedUOM + ",'" + rowQtySpn.ClientID.ToString() + "','" + txtUsrQty.ClientID.ToString() + "'," + e.Row.RowIndex + "," + Price + ",'" + rowPriceTotal.ClientID.ToString() + "'," + moq + ")");

                    txtUsrPrice.Attributes.Add("onblur", "javascript:GetChangedPrice(this," + SelectedQty + "," + SelectedUOM + ",'" + rowQtySpn.ClientID.ToString() + "','" + txtUsrQty.ClientID.ToString() + "'," + e.Row.RowIndex + ",'" + rowPriceTotal.ClientID.ToString() + "'," + ProdID + ")");
                    //}
                }
            }
            catch (System.Exception ex)
            {
                Login.Profile.ErrorHandling(ex, this, "Request Template", "Grid1_OnRowDataBound");
            }
            finally { objService.Close(); }
        }
Example #11
0
 protected void Grid1_RowDataBound(object sender, Obout.Grid.GridRowEventArgs e)
 {
     //int[] a = new int[1000];
 }