Ejemplo n.º 1
0
        protected bool HasHrId()
        {
            FacultyReportsBusiness FRB = new FacultyReportsBusiness();
            int codeostad = Convert.ToInt32(Session[sessionNames.userID_StudentOstad]);
            var prof      = FRB.GetOstadInfoFromHR(codeostad);

            if (prof.Rows.Count > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 2
0
        protected void btnTesti4_Click(object sender, EventArgs e)
        {
            LoginBusiness          lgb = new LoginBusiness();
            FacultyReportsBusiness facultyReportsBusiness = new FacultyReportsBusiness();
            var       userAdobe = "200" + Session[sessionNames.userID_StudentOstad].ToString();
            DataTable dtHR      = facultyReportsBusiness.GetOstadInfoFromHR(Convert.ToInt32(Session[sessionNames.userID_StudentOstad]));

            if (dtHR != null && dtHR.Rows.Count > 0)
            {
                string firtsName = dtHR.Rows[0]["name"].ToString().Trim() == "" ? "نامشخص" : dtHR.Rows[0]["name"].ToString().Trim();
                string lastName  = dtHR.Rows[0]["family"].ToString().Trim() == "" ? "نامشخص" : dtHR.Rows[0]["family"].ToString().Trim();

                adobeConnectDTO.SetValueDefult(userAdobe, passAdobeUser, firtsName, lastName);
                adobeConnectDTO.MeetingUrlPath = "/st99900999_13981107_4";
            }

            string link = "http://" + adobeBusiness.OpenMeetingAsPresnter(adobeConnectDTO);

            Response.Redirect(link);
        }
Ejemplo n.º 3
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;
                }
            }
        }
        protected void lnkLinkDefence_Click(object sender, EventArgs e)
        {
            System.Web.UI.WebControls.Button btn = (System.Web.UI.WebControls.Button)sender;
            GridDataItem item  = (GridDataItem)btn.NamingContainer;
            Label        vazId = (Label)item.FindControl("lblVazId");


            if (vazId.Text == "1")
            {
                LoginBusiness          lgb = new LoginBusiness();
                FacultyReportsBusiness facultyReportsBusiness = new FacultyReportsBusiness();
                var       userAdobe = "200" + Session[sessionNames.userID_StudentOstad].ToString();
                DataTable dtHR      = facultyReportsBusiness.GetOstadInfoFromHR(Convert.ToInt32(Session[sessionNames.userID_StudentOstad]));
                if (dtHR != null && dtHR.Rows.Count > 0)
                {
                    string firtsName = dtHR.Rows[0]["name"].ToString().Trim() == "" ? "نامشخص" : dtHR.Rows[0]["name"].ToString().Trim();
                    string lastName  = dtHR.Rows[0]["family"].ToString().Trim() == "" ? "نامشخص" : dtHR.Rows[0]["family"].ToString().Trim();

                    adobeConnectDTO.SetValueDefult(userAdobe, passAdobeUser, firtsName, lastName);


                    var Link = item.FindControl("resLink") as Label;

                    adobeConnectDTO.MeetingUrlPath = "/" + Link.Text.Replace("/", "");//name.Text;
                }
            }
            else
            {
                RadWindowManager1.RadAlert("جلسه دفاع در حال حاضر در دسترس نیست", 500, 100, "خطا", "");
                return;
            }


            string link = "http://" + adobeBusiness.OpenMeetingAsPresnter(adobeConnectDTO);

            Response.Redirect(link);
        }
Ejemplo n.º 5
0
        protected void grdProfessorStatus_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            //System.Threading.Thread.Sleep(5000);
            if (e.CommandName == "send")
            {
                GridViewRow            curruntRow = (GridViewRow)(((Button)e.CommandSource).NamingContainer);
                DropDownList           drpStatus  = (DropDownList)curruntRow.FindControl("drpUserStatus") as DropDownList;
                string                 status     = drpStatus.SelectedValue;
                string                 UserName   = e.CommandArgument.ToString();
                FacultyReportsBusiness FRB        = new FacultyReportsBusiness();
                try
                {
                    DataTable user = FRB.GetInfoPeoByCodeMeli(UserName);

                    string lastStatus = drpStatus.Items.FindByValue(user.Rows[0]["status"].ToString()).Text;
                    string newStatus  = drpStatus.Items.FindByValue(status).Text;
                    if (canChangeStatus(Convert.ToInt32(user.Rows[0]["status"]), Convert.ToInt32(status)))
                    {
                        FRB.UpdateInfoPeopleStatus(UserName, status);

                        CommonBusiness cb = new CommonBusiness();
                        cb.InsertIntoUserLog(int.Parse(Session[sessionNames.userID_Karbar].ToString()), DateTime.Now.ToShortTimeString(), int.Parse(Session[sessionNames.appID_Karbar].ToString()), (int)DTO.eventEnum.تغییر_وضعیت_استاد, " تغییر وضعیت از " + lastStatus + " به " + newStatus, int.Parse(user.Rows[0]["ID"].ToString()));
                        RadWindowManager1.RadAlert("تغییر وضعیت استاد انجام شد.", 300, 100, "پیام سیستم", "");
                    }
                    else
                    {
                        RadWindowManager1.RadAlert(" تغییر وضعیت از " + lastStatus + " به " + newStatus + " امکان پذیر نمی باشد.", 300, 100, "پیام سیستم", "");
                    }
                    if (user.Rows.Count > 0)
                    {
                        grdProfessorStatus.DataSource = user;
                        grdProfessorStatus.DataBind();
                    }
                }
                catch (Exception)
                {
                    throw;
                }
                finally
                {
                    FRB = null;
                }
            }
            else if (e.CommandName == "Details")
            {
                Session["page"] = 4;
                Response.Redirect("ShowDetailInfo.aspx?ID=" + e.CommandArgument.ToString());
            }
            else if (e.CommandName == "History")
            {
                // TeacherName.InnerText ="کد استاد: "+ e.CommandArgument.ToString();
                CommonBusiness cmb = new CommonBusiness();

                lst_history.DataSource = cmb.getUserAndStudentLogByAppId(13, int.Parse(e.CommandArgument.ToString()));
                lst_history.DataBind();


                //rgHistoryGrid.DataSource = cmb.getUserAndStudentLogByAppId(13, int.Parse(e.CommandArgument.ToString()), 5);
                //rgHistoryGrid.DataBind();
                ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openModal();", true);
            }
        }