Exemplo n.º 1
0
        protected void DdlSubCPP_TextChanged(object sender, EventArgs e)
        {
            string VbPn;

            VbPn = (GrdAR.FooterRow.FindControl("DdlSubCPP") as DropDownList).SelectedValue.Trim();
            if (VbPn.ToString() != string.Empty)
            {
                DSTDdl = (DataSet)ViewState["DSTDdl"];
                TextBox   TxtDescPP = GrdAR.FooterRow.FindControl("TxtDescPP") as TextBox;
                DataRow[] Result    = DSTDdl.Tables[1].Select("PN= '" + VbPn + "'");
                foreach (DataRow row in Result)
                {
                    if (TxtDescPP != null)
                    {
                        TxtDescPP.Text = row["Descripcion"].ToString();
                    }
                }
            }
            foreach (GridViewRow RowAR in GrdAR.Rows)
            {
                if ((int)ViewState["VblEliMS"] == 0)
                {
                    ImageButton imgD = RowAR.FindControl("IbtDelete") as ImageButton;
                    if (imgD != null)
                    {
                        RowAR.Cells[8].Controls.Remove(imgD);
                    }
                }
            }
        }
Exemplo n.º 2
0
        protected void BtnAlaR_Click(object sender, EventArgs e)
        {
            BtnAlaR.BackColor = Color.SandyBrown;
            BtnAlaR.Font.Bold = true;
            BtnAlaR.Font.Size = 14;

            BtnAlaF.BackColor = Color.LightBlue;
            BtnAlaF.Font.Bold = false;
            BtnAlaF.Font.Size = 13;

            PnlAF.Visible = false;
            PnlAR.Visible = true;
            foreach (GridViewRow RowAR in GrdAR.Rows)
            {
                if ((int)ViewState["VblEliMS"] == 0)
                {
                    ImageButton imgD = RowAR.FindControl("IbtDelete") as ImageButton;
                    if (imgD != null)
                    {
                        RowAR.Cells[8].Controls.Remove(imgD);
                    }
                }
            }
        }