Пример #1
0
    protected void lstSubType_Type_SelectedIndexChanged(object sender, EventArgs e)
    {
        DataTable dt = LookupsManagement.GetLookupSubTypeData(Convert.ToInt32(lstSubType.SelectedValue), Convert.ToInt32(lstSubType_Type.SelectedValue));

        if (dt != null && dt.Rows.Count > 0)
        {
            pnlSubTypeSubType_Type.Visible        = true;
            lstSubTypeSubType_Type.DataSource     = dt;
            lstSubTypeSubType_Type.DataTextField  = "LookupSubTypeName";
            lstSubTypeSubType_Type.DataValueField = "LookupSubTypeID";
            lstSubTypeSubType_Type.DataBind();
            lstSubTypeSubType_Type.Attributes.Add("onchange", "fillTypeSubType();");
        }
        else
        {
            lstSubTypeSubType_Type.DataSource = string.Empty;
            lstSubTypeSubType_Type.DataBind();
            pnlSubTypeSubType_Type.Visible = true;
        }
        txtSubTypeSubType_Type.Text    = string.Empty;
        txtSubTypeSubType_TypeDes.Text = string.Empty;
        divAddSubTypeSubType.Style.Add("display", "none");
        divUpdateSubTypeSubType.Style.Add("display", "inline");
        divDeleteSubTypeSubType.Style.Add("display", "inline");
        divCancelSubTypeSubType.Style.Add("display", "inline");
        divSubDelete.Style.Add("display", "none");
    }
Пример #2
0
    protected void lstvalue_SelectedIndexChanged(object sender, EventArgs e)
    {
        ImageButton1.Visible   = true;
        ImageButton2.Visible   = true;
        txtSubType.Text        = string.Empty;
        txtSubDescription.Text = string.Empty;
        DataTable dt = LookupsManagement.GetLookupSubTypeData(Convert.ToInt32(lstvalue.SelectedValue), 0);

        if (dt != null && dt.Rows.Count > 0)
        {
            pnlSubType.Visible        = true;
            lstSubType.DataSource     = dt;
            lstSubType.DataTextField  = "LookupSubTypeName";
            lstSubType.DataValueField = "LookupSubTypeID";
            lstSubType.DataBind();
            lstSubType.Attributes.Add("onchange", "fillSubType();");
        }
        else
        {
            lstSubType.DataSource = string.Empty;
            lstSubType.DataBind();
            pnlSubType.Visible = true;
        }
        divdelete.Style.Add("display", "inline");

        divSubAdd.Style.Add("display", "inline");
        divSubCancel.Style.Add("display", "none");
        divSubDelete.Style.Add("display", "none");
        divSubUpdate.Style.Add("display", "none");

        pnlSubType_Type.Visible = false;
    }