Esempio n. 1
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            if (txtCodeMeli.Text == string.Empty && txtName.Text == string.Empty)
            {
                string message = "حداقل باید یکی از فیلدها را پر کنید";
                RadWindowManager1.RadAlert(message, 0, 100, " پیام سیستم", "");
            }
            else
            {
                FacultyReportsBusiness FRB = null;
                try
                {
                    string ssn  = txtCodeMeli.Text;
                    string name = txtName.Text;

                    FRB = new FacultyReportsBusiness();
                    DataTable user = FRB.GetInfoPeoByCodeMeliAndFamily(ssn, name);
                    if (user.Rows.Count > 0)
                    {
                        grdProfessorStatus.DataSource = user;
                        grdProfessorStatus.DataBind();
                        if (Session["RoleID"].ToString() == "11" || Session["RoleID"].ToString() == "12")
                        {
                            grdProfessorStatus.Columns[10].Visible = false;
                        }
                    }
                    else
                    {
                        RadWindowManager1.RadAlert("اطلاعات یافت نشد", 300, 100, "پیام سیستم", "");
                    }
                }
                catch (Exception)
                {
                    throw;
                }
                finally
                {
                    FRB = null;
                }
            }
        }