示例#1
0
        protected void btn_ProfCode_Click(object sender, EventArgs e)
        {
            if (txt_Family.Text == null || txt_Family.Text == string.Empty)
            {
                txt_Family.Text = "0";
            }
            if (txt_NameEp.Text == null || txt_NameEp.Text == string.Empty)
            {
                txt_NameEp.Text = "0";
            }
            if (txt_ProfCode.Text == null || txt_ProfCode.Text == string.Empty)
            {
                txt_ProfCode.Text = "0";
            }
            DataTable dtResault = CB.GetInformationFacultyByFilter(int.Parse(txt_ProfCode.Text), txt_Family.Text, txt_NameEp.Text, int.Parse(ddl_Cooperation.SelectedValue));

            if (dtResault.Rows.Count > 0)
            {
                grd_Faculty.DataSource = dtResault;
                grd_Faculty.DataBind();
            }
            else
            {
                rwd.RadAlert("رکوردی وجود ندارد", 0, 100, "پیام", "");
            }
            if (txt_Family.Text == "0")
            {
                txt_Family.Text = string.Empty;
            }
            if (txt_NameEp.Text == "0")
            {
                txt_NameEp.Text = string.Empty;
            }
            if (txt_ProfCode.Text == "0")
            {
                txt_ProfCode.Text = string.Empty;
            }
        }