コード例 #1
0
 protected void BtnGrp_Click(object sender, EventArgs e)
 {
     LblNameOnChat.Text = "گفتگو دفاع";
     TxtIdOnChat.Text   = "";
     LblIdGrp.Text      = UserStudent;
     RfrhDtLstMessage(true);
     MessageJs.DeleteUnreadStudent(userID_Ostad, "true", "-1");
 }
コード例 #2
0
 protected void BtnPesonal_Click(object sender, EventArgs e)
 {
     LblNameOnChat.Text = "گفتگو شخصی";
     TxtIdOnChat.Text   = UserStudent;
     LblIdGrp.Text      = "";
     RfrhDtLstMessage(false);
     MessageJs.DeleteUnreadStudent(userID_Ostad, "false", UserStudent);
 }
コード例 #3
0
        protected void Page_Init(object sender, EventArgs e)
        {
            if (Session[sessionNames.userID_StudentOstad] == null)
            {
                Response.Redirect("~/CommonUI/login.aspx");
            }
            else
            {
                Session["CountUnRead"]   = null;
                Session["ContactUnread"] = null;
                LoginBusiness         logBusiness = new LoginBusiness();
                System.Data.DataTable dt          = new System.Data.DataTable();
                string userId = Session[sessionNames.userID_StudentOstad].ToString();
                user.Text = userId;
                //if (Request.QueryString["Flag_Grp"] != null )
                //{
                MessageJs.DeleteUnreadStudent(userId, Request.QueryString["Flag_Grp"] != null? Request.QueryString["Flag_Grp"]: "True",
                                              Request.QueryString["Flag_Grp"] != null && Request.QueryString["Flag_Grp"].Trim() != "True" && Request.QueryString["IdGrpOrPerson"] != null
                    ? Request.QueryString["IdGrpOrPerson"] :"-1");
                // }
                if (!IsPostBack)
                {
                    StuImg st = logBusiness.User_Img(Session[sessionNames.userID_StudentOstad].ToString());
                    PersonalImage.DataValue = st.img;
                    LoginDTO stInfo = logBusiness.Get_StInfo(Session[sessionNames.userID_StudentOstad].ToString());
                    stName.InnerText = stInfo.Name + " " + stInfo.LastName;


                    DataTable dtCountUnread;
                    DataTable dtUnReadContact;
                    dtCountUnread = MsgUnReadStudentBuisnes.GetUnReadMsgCountStudent(userId);

                    if (dtCountUnread != null && dtCountUnread.Rows.Count > 0)
                    {
                        Session["CountUnRead"] = dtCountUnread.Rows[0]["CountUnRead"].ToString();
                        dtUnReadContact        = MsgUnReadStudentBuisnes.GetUnReadMsgStudent(userId);
                        Session.Add("ContactUnread", dtUnReadContact);
                    }
                }
            }
        }
コード例 #4
0
        protected void DtlstContact_ItemCommand(object source, System.Web.UI.WebControls.DataListCommandEventArgs e)
        {
            if (e.CommandName == "IdName")
            {
                LblCurCount.Text    = "0";
                LblSearchCount.Text = "0";
                LblSearchText.Text  = "";
                TxtIdOnChat.Text    = Convert.ToString(e.CommandArgument);

                if (TxtIdOnChat.Text != "" && TxtIdOnChat.Text != "0")
                {
                    RfrhDtLstMessage(false);
                    LblIdGrp.Text = "";
                    MessageJs.DeleteUnreadStudent(LblIdUser.Text, "false", TxtIdOnChat.Text);
                }

                else
                {
                    RfrhDtLstMessage(true);
                    LblIdGrp.Text = userID_Student;
                    MessageJs.DeleteUnreadStudent(LblIdUser.Text, "true", "-1");
                }
            }
        }
コード例 #5
0
        protected void Page_Init(object sender, EventArgs e)
        {
            if (Session[sessionNames.userID_StudentOstad] == null)
            {
                Response.Redirect("~/CommonUI/login.aspx");
            }
            else
            {
                Session["CountUnRead"]   = null;
                Session["ContactUnread"] = null;
                LoginBusiness         logBusiness = new LoginBusiness();
                System.Data.DataTable dt          = new System.Data.DataTable();
                userId   += Session[sessionNames.userID_StudentOstad].ToString();
                user.Text = userId;
                if (Request.QueryString["Flag_Grp"] != null)
                {
                    MessageJs.DeleteUnreadStudent(userId, Request.QueryString["Flag_Grp"],
                                                  Request.QueryString["Flag_Grp"].Trim() != "True" && Request.QueryString["IdGrpOrPerson"] != null
                    ? Request.QueryString["IdGrpOrPerson"] : "-1");
                }
                //     if (!IsPostBack)
                {
                    stName.InnerText = Session[sessionNames.userName_StudentOstad].ToString();
                    DataTable dtCountUnread;
                    DataTable dtContactUnread;
                    dtCountUnread = MsgUnReadOstadBuisnes.GetUnReadMsgCountOstad(userId);

                    if (dtCountUnread != null && dtCountUnread.Rows.Count > 0)
                    {
                        Session["CountUnRead"] = dtCountUnread.Rows[0]["CountUnRead"].ToString();
                        dtContactUnread        = MsgUnReadOstadBuisnes.GetUnReadMsgOstad(userId);
                        Session.Add("ContactUnread", dtContactUnread);
                    }
                }
            }
        }