当前位置: 首页>>代码示例>>C#>>正文


C# UserRepository.getUsersById方法代码示例

本文整理汇总了C#中SocioBoard.Model.UserRepository.getUsersById方法的典型用法代码示例。如果您正苦于以下问题:C# UserRepository.getUsersById方法的具体用法?C# UserRepository.getUsersById怎么用?C# UserRepository.getUsersById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SocioBoard.Model.UserRepository的用法示例。


在下文中一共展示了UserRepository.getUsersById方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: IsUserValid

        /// <summary>
        /// This function check Is User Exist or Not created by Abhay Kr 5-2-2014
        /// </summary>
        /// <param name="UserId"></param>
        /// <returns>bool</returns>
        public bool IsUserValid(string UserId, ref User user)
        {
            bool ret = false;
            try
            {

                UserRepository objUserRepository = new UserRepository();
                user = objUserRepository.getUsersById(Guid.Parse(UserId));
                if (user != null)
                    ret = true;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                logger.Error(ex.Message);
            }
            return ret;
        }
开发者ID:rathika1,项目名称:socioboard,代码行数:23,代码来源:Registration.aspx.cs

示例2: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (Request.QueryString != null)
                {
                    try
                    {
                        string custom = Request.QueryString["custom"];
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine("Error : " + ex.StackTrace);
                    }
                }

                if (Request.Form != null)
                {

                    //Get O/P >> Request.Form {mc_gross=89.00&protection_eligibility=Eligible&address_status=confirmed&payer_id=HYNG9RCLH48WC&tax=0.00&address_street=1+Main+St&payment_date=04%3a05%3a11+Feb+14%2c+2014+PST&payment_status=Completed&charset=windows-1252&address_zip=95131&first_name=Babita&mc_fee=2.88&address_country_code=US&address_name=Babita+Sinha&notify_version=3.7&custom=256f9c69-6b6a-4409-a309-b1f6d1f8e43b&payer_status=unverified&business=pbpraveen%40globussoft.com&address_country=United+States&address_city=San+Jose&quantity=1&payer_email=babitasinha102%40yahoo.com&verify_sign=AudjwUiCo.wy3HNpdy6W2f1OTj7HAMzUhH.XfOvEQoXh3Jg8DE1dsZLc&txn_id=20X29418LJ642962P&payment_type=instant&last_name=Sinha&address_state=CA&receiver_email=pbpraveen%40globussoft.com&payment_fee=2.88&receiver_id=AF2RVCTNXRVHA&txn_type=web_accept&item_name=Deluxe&mc_currency=USD&item_number=&residence_country=US&test_ipn=1&handling_amount=0.00&transaction_subject=256f9c69-6b6a-4409-a309-b1f6d1f8e43b&payment_gross=89.00&shipping=0.00&merchant_return_link=click+here&auth=AWBkWTCIt.vP.rsV.Pgb3ZpjH10upSH98oRXgsj.ZmWOGUNmMf50qaZ4Jq.rEcQNtFpYp0DJpbStsLJlkXfYxig}

                    Guid custom =Guid.Parse(Request.Form["custom"].ToString());
                    int res = SetPaymentStatus(custom);

                    UserRepository objUserRepository = new UserRepository();

                    Session["LoggedUser"] = objUserRepository.getUsersById(custom);

                    Response.Redirect("Home.aspx");
                }

                
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error : " + ex.StackTrace);
            }
        }
开发者ID:JBNavadiya,项目名称:socioboard,代码行数:38,代码来源:SuccessPaypal.aspx.cs

示例3: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            string ret = string.Empty;
            try
            {
                User objUser = new User();
                UserRepository objUserRepository = new UserRepository();
                scheduling objscheduling = new scheduling();
                ScheduledMessage objScheduledMessage = new ScheduledMessage();
                ScheduledMessageRepository objScheduledMessageRepository = new ScheduledMessageRepository();
                List<ScheduledTracker> lstScheduledTracker = objScheduledMessageRepository.GetAllScheduledDetails();
                foreach (ScheduledTracker item in lstScheduledTracker)
                {
                    try
                    {
                        //List<ScheduledMessage> lstScheduledMessage = objScheduledMessageRepository.getAllMessagesOfUser(Guid.Parse(item._Id));
                        List<ScheduledMessage> lstUnsentScheduledMessage = objScheduledMessageRepository.getAllIUnSentMessagesOfUser(Guid.Parse(item._Id));
                        objUser = objUserRepository.getUsersById(Guid.Parse(item._Id));
                        ret += "<tr class=\"gradeX\"><td><a href=\"ScheduledMessageDetail.aspx?id=" + objUser.Id + "\">" + objUser.UserName + "</a></td><td>" + item._count + "</td><td>" + (item._count - lstUnsentScheduledMessage.Count()) + "</td><td>" + lstUnsentScheduledMessage.Count() + "</td></tr>";

                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.Message);
                     
                    }
                }
            }
            catch (Exception ex)
            {

                Console.WriteLine(ex.Message);
            }

            Response.Write(ret);
        }
开发者ID:JBNavadiya,项目名称:socioboard,代码行数:36,代码来源:Ajaxscheduled.aspx.cs

示例4: IsUserReferenceActivated

        /// <summary>
        /// to check user reference and update user expiry , userrefrencerelation status
        /// created by Abhay Kr 5-3-2014
        /// </summary>
        /// <param name="RefereeId"></param>
        /// <returns></returns>
        public bool IsUserReferenceActivated(string RefereeId)
        {
            //testing
            Console.WriteLine("Inside " + RefereeId);

            bool ret = false;
            try
            {
                User objUser = new User();
                Package objPackage=new Package ();
                UserPackageRelation objUserPackageRelation=new UserPackageRelation ();
                UserRepository objUserRepository = new UserRepository();
                UserPackageRelationRepository objUserPackageRelationRepository = new UserPackageRelationRepository();
                UserRefRelation objUserRefRelation = new UserRefRelation();
                UserRefRelationRepository objUserRefRelationRepository = new UserRefRelationRepository();
                PackageRepository objPackageRepository = new PackageRepository();
                objUserRefRelation.ReferenceUserId = (Guid.Parse(RefereeId));

                //testing
                List<UserRefRelation> check =objUserRefRelationRepository.GetUserRefRelationInfo();
                //testing

                List<UserRefRelation> lstUserRefRelation = objUserRefRelationRepository.GetUserRefRelationInfoByRefreeId(objUserRefRelation);
                if (lstUserRefRelation.Count > 0)
                {
                    if (lstUserRefRelation[0].Status == "0")
                    {
                        objUserRefRelation = lstUserRefRelation[0];
                        objUserRefRelation.Status = "1";
                        objUser = objUserRepository.getUsersById(lstUserRefRelation[0].ReferenceUserId);
                        objUser.ExpiryDate = objUser.ExpiryDate.AddDays(30);
                        objUser.AccountType = "Premium";
                        objPackage = objPackageRepository.getPackageDetails("Premium");

                        objUserPackageRelation.Id=Guid.NewGuid();
                        objUserPackageRelation.UserId=objUser.Id;
                        objUserPackageRelation.PackageId=objPackage.Id;
                        objUserPackageRelation.ModifiedDate=DateTime.Now;
                        objUserPackageRelation.PackageStatus=true;
                        objUserPackageRelationRepository.AddUserPackageRelation(objUserPackageRelation);
                        int objUserRepositoryresponse = objUserRepository.UpdateUserExpiryDateById(objUser);
                        int objUserRefRelationRepositoryresponse = objUserRefRelationRepository.UpdateStatusById(objUserRefRelation);
                    }
                }

            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
            }
            return ret;
        }
开发者ID:rathika1,项目名称:socioboard,代码行数:58,代码来源:Site.Master.cs

示例5: getTaskDetail

        public void getTaskDetail(int days)
        {
            try
            {
                User user = (User)Session["LoggedUser"];
                SocioBoard.Domain.Team team = (SocioBoard.Domain.Team)Session["GroupName"];
                TaskRepository objTaskRepo = new TaskRepository();
                List<object> destination = new List<object>();
                //ArrayList lstTask = objTaskRepo.getTasksByUserwithDetail(user.Id, days);
                ArrayList lstTask = objTaskRepo.getTasksByUserwithDetail(user.Id, days, team.GroupId);
                string strTask = "<div class=\"task-labels\"><div class=\"task-labe-1\">TASK OWNER</div><div class=\"task-labe-2\">ASSIGNED</div>" +
                                 "<div class=\"task-labe-3\">TASK MESSAGE</div><div class=\"task-labe-4\">ASSIGN DATE</div><div class=\"task-labe-5\">COMPLETION DATE</div>" +
                                 "<div class=\"task-labe-6\">STATUS</div><div class=\"clear\"></div></div>";
                foreach (var item in lstTask)
                {
                    Array temp = (Array)item;
                    string taskStatus = string.Empty;
                    string completeDate = string.Empty;
                    if (temp.GetValue(5).Equals(false))
                    {
                        taskStatus = "Incomplete";
                    }
                    else
                    {
                        taskStatus = "Completed";
                        //completeDate = temp.GetValue(6).ToString();
                        //0001-01-01 00:00:00
                    }
                    if (temp.GetValue(7).Equals("0001-01-01 00:00:00"))
                    {
                        completeDate = "Pending";
                    }
                    else
                    {
                        completeDate = temp.GetValue(7).ToString();
                    }
                    UserRepository objusrrepo = new UserRepository();
                    Guid ownid = (Guid)temp.GetValue(3);
                    User taskowner = objusrrepo.getUsersById(ownid);
                    Guid assgnId = (Guid)temp.GetValue(4);
                    User asgntaskto = objusrrepo.getUsersById(assgnId);



                    //strTask = strTask + "<div class=\"task-header\"><div class=\"task-header-owner\"><div class=\"avathar-pub\"><img src=\"" + temp.GetValue(10) + "\" alt=\"\" /></div>" +
                    //                "<div class=\"task-header-owner-name\">" + user.UserName + "</div><div class=\"clear\"></div></div><div class=\"assigned-lable\">" + temp.GetValue(8) + "</div><div class=\"assigned-lable\">" + temp.GetValue(1) + "</div><div class=\"task-text-3\">" + temp.GetValue(5) + "</div>" +
                    //                "<div class=\"task-text-4\">" + completeDate + "</div><div class=\"task-text-5\">" + taskStatus + "</div><div class=\"clear\"></div></div>";

                    strTask = strTask + "<div class=\"task-header\"><div class=\"task-header-owner\"><div class=\"avathar-pub\"><img src=\"" + taskowner.ProfileUrl + "\" alt=\"\" /></div>" +
                                    "<div class=\"task-header-owner-name\">" + taskowner.UserName + "</div><div class=\"clear\"></div></div><div class=\"assigned-lable\">" + asgntaskto.UserName + "</div><div class=\"assigned-lable\">" + temp.GetValue(2) + "</div><div class=\"task-text-3\">" + temp.GetValue(6) + "</div>" +
                                    "<div class=\"task-text-4\">" + completeDate + "</div><div class=\"task-text-5\">" + taskStatus + "</div><div class=\"clear\"></div></div>";

                    temp.GetValue(0);
                }
                taskCount = lstTask.Count;
                taskdiv.InnerHtml = strTask;
                divName.InnerHtml = user.UserName;

            }
            catch (Exception err)
            {
                Console.Write(err.StackTrace);
            }
        }
开发者ID:JBNavadiya,项目名称:socioboard,代码行数:64,代码来源:TeamReport.aspx.cs

示例6: btnResetPwd_Click

        protected void btnResetPwd_Click(object sender, ImageClickEventArgs e)
        {
            UserRepository userrepo = new UserRepository();
            
            try
            {
                Registration regpage = new Registration();

                if (txtpass.Text == txtconfirmpass.Text)
                {
                    string changedpassword = regpage.MD5Hash(txtpass.Text);
                   
                    if (userrepo.ResetPassword(Guid.Parse(userid.ToString()), changedpassword.ToString()) > 0)
                    {
                        User usr = userrepo.getUsersById(Guid.Parse(userid.ToString()));

                        // Code written by Abhay Kr Mondal 8/8/2014
                        ///below block of code is used to send email with user information
                        ///Begin
                        string strUrl = string.Empty;
                        string URL = Request.Url.AbsoluteUri;
                        //strUrl = URL.Replace("ForgetPassword.aspx", "ChangePassword.aspx" + "?str=" + regObject.MD5Hash(txtEmail.Text) + "&type=forget");
                        //strUrl = (strUrl + "?userid=" + usr.Id).ToString();
                        string mailpath = HttpContext.Current.Server.MapPath("~/Layouts/Mails/UserInfo.htm");
                        string MailBody = File.ReadAllText(mailpath);
                        MailBody = MailBody.Replace("%FN%", usr.UserName);
                        MailBody = MailBody.Replace("%UN%", usr.EmailId);
                        MailBody = MailBody.Replace("%PWD%", txtpass.Text.ToString());
                        string username = ConfigurationManager.AppSettings["username"];
                        string host = ConfigurationManager.AppSettings["host"];
                        string port = ConfigurationManager.AppSettings["port"];
                        string pass = ConfigurationManager.AppSettings["password"];
                        string from = ConfigurationManager.AppSettings["fromemail"];

                        //   string Body = mailformat.VerificationMail(MailBody, txtEmail.Text.ToString(), "");
                        string Subject = "New Password for Your Socioboard Account";
                        //MailHelper.SendMailMessage(host, int.Parse(port.ToString()), username, pass, txtEmail.Text.ToString(), string.Empty, string.Empty, Subject, MailBody);
                        MailHelper.SendSendGridMail(host, Convert.ToInt32(port), from, "", usr.EmailId.ToString(), string.Empty, string.Empty, Subject, MailBody, username, pass);
                       // lblerror.Text = "Please check your mail for the instructions.";

                        // Code written by Abhay Kr Mondal 8/8/2014
                        ///below block of code is used to send email with user information

                        lblerror.Text = "Password Reset Successfully";
                    }
                    else
                    {
                        lblerror.Text = "Problem while resetting password";
                    }
                }
                else
                {
                    lblerror.Text = "Password mismatch!";
                }


            }
            catch (Exception Err)
            {
                logger.Error(Err.StackTrace);
            }
        }
开发者ID:JBNavadiya,项目名称:socioboard,代码行数:62,代码来源:ForgotPassword.aspx.cs

示例7: ProcessRequest


//.........这里部分代码省略.........
                    }
                }

                else if (Request.QueryString["op"] == "wooqueuemessages")
                {
                    string profileid = string.Empty;
                    ScheduledMessageRepository schmsgRepo = new ScheduledMessageRepository();
                    List<TeamMemberProfile> allprofiles = objTeamMemberProfileRepository.getAllTeamMemberProfilesOfTeam(team.Id);
                    foreach (TeamMemberProfile item in allprofiles)
                    {
                        profileid += item.ProfileId + ',';

                    }
                    profileid = profileid.Substring(0, profileid.Length - 1);

                    List<ScheduledMessage> lstschMsg = schmsgRepo.getAllMessagesDetail(profileid);
                    string schmessages = string.Empty;
                    //string profurl = string.Empty;
                    //if (string.IsNullOrEmpty(user.ProfileUrl))
                    //{
                    string profurls = "../Contents/img/blank_img.png";
                    //}
                    //else
                    //{
                    //    // profurl = "../Contents/img/blank_img.png";
                    //    profurl = user.ProfileUrl;
                    //}
                    if (lstschMsg.Count != 0)
                    {
                        foreach (ScheduledMessage item in lstschMsg)
                            try
                            {
                                UserRepository objUserRepository=new UserRepository();
                                User objuser = objUserRepository.getUsersById(item.UserId);
                                string profurl = string.Empty;
                                if (string.IsNullOrEmpty(objuser.ProfileUrl))
                                {
                                    profurl = "../Contents/img/blank_img.png";
                                }
                                else
                                {
                                    // profurl = "../Contents/img/blank_img.png";
                                    profurl = objuser.ProfileUrl;
                                }

                                {
                                    schmessages += "<section class=\"section\"><div  class=\"js-task-cont read\">" +
                                                             "<section class=\"task-owner\">" +
                                                                 "<img width=\"32\" height=\"32\" border=\"0\" src=\"" + profurl + "\" class=\"avatar\">" +
                                                             "</section>" +
                                                             "<section class=\"task-activity third\">" +
                                                                 "<p>" + objuser.UserName + "</p>" +
                                                                 "<div>" + CompareDateWithServerNew(item.ClientTime, item.CreateTime, item.ScheduleTime) + "</div>" +
                                                                 "<input type=\"hidden\" value=\"#\" id=\"hdntaskid_1\">" +
                                                                 "<p></p>" +
                                                           "</section>" +
                                                           "<section class=\"task-message font-13 third\" style=\"height: auto; width: 31%; margin-right: 9px;\"><a id=\"edit_" + item.Id + "\" onclick=\"Editqueue('" + item.Id + "','" + item.ShareMessage + "');\" class=\"tip_left\">" + gethtmlfromstring(item.ShareMessage) + "</a></section>";

                                    if (item.ProfileType == "facebook")
                                    {
                                        schmessages += "<div style=\"height:70px; margin-top: 0;\" class=\"userpictiny\">" +
                                                            "<img width=\"48\" height=\"48\" src=\"http://graph.facebook.com/" + item.ProfileId + "/picture?type=small\" alt=\"\">" +
                                                            "<a style=\"right: 2px; top: 40px;\" title=\"\" class=\"userurlpic\" href=\"#\">" +
                                                                "<img  alt=\"\" src=\"../Contents/img/facebook.png\" style=\"height: 16px;width: 16x;\"></a></div>";
                                    }
                                    else if (item.ProfileType == "twitter")
开发者ID:utkarshx,项目名称:socioboard,代码行数:67,代码来源:AjaxHome.aspx.cs

示例8: IsUserReferenceActivated

        /// <summary>
        /// to check user reference and update user expiry , userrefrencerelation status
        /// created by Abhay Kr 5-3-2014
        /// </summary>
        /// <param name="RefereeId"></param>
        /// <returns></returns>
        public bool IsUserReferenceActivated(string RefereeId)
        {
            bool ret = false;
            try
            {
                User objUser = new User();
                UserRepository objUserRepository = new UserRepository();
                UserRefRelation objUserRefRelation = new UserRefRelation();
                UserRefRelationRepository objUserRefRelationRepository = new UserRefRelationRepository();
                objUserRefRelation.ReferenceUserId = (Guid.Parse(RefereeId));
                List<UserRefRelation> lstUserRefRelation = objUserRefRelationRepository.GetUserRefRelationInfoById(objUserRefRelation);
                if (lstUserRefRelation.Count > 0)
                {
                    if (lstUserRefRelation[0].Status == "0")
                    {
                        objUserRefRelation = lstUserRefRelation[0];
                        objUserRefRelation.Status = "1";
                        objUser = objUserRepository.getUsersById(lstUserRefRelation[0].ReferenceUserId);
                        objUser.ExpiryDate = objUser.ExpiryDate.AddDays(30);

                        int objUserRepositoryresponse = objUserRepository.UpdateUserExpiryDateById(objUser);

                        int objUserRefRelationRepositoryresponse = objUserRefRelationRepository.UpdateStatusById(objUserRefRelation);
                    }
                }

            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
            }
            return ret;
        }
开发者ID:NALSS,项目名称:socioboard,代码行数:39,代码来源:Site.Master.cs

示例9: sendmail_Click

        //protected void btnSave_Click(object sender, EventArgs e)
        //{
        //    try
        //    {
        //        NewsLetter objNl = new NewsLetter();
        //        NewsLetterRepository objnlRepo = new NewsLetterRepository();
        //        foreach (ListItem listItem in chkUser.Items)
        //        {
        //            if (listItem.Selected)
        //            {
        //                objNl.Id = Guid.NewGuid();
        //                objNl.Subject = txtSubject.Text;
        //                objNl.NewsLetterDetail = Editor.Text;
        //               // objNl.SendDate = DateTime.Parse(txtSendDate.Text);
        //                objNl.SendStatus = false;
        //                objNl.UserId = Guid.Parse(listItem.Value);
        //                if (!objnlRepo.checkNewsLetterExists(Editor.Text))
        //                    objnlRepo.AddNewsLetter(objNl);
        //                else
        //                    objnlRepo.UpdateNewsLetter(objNl);
        //            }
        //        }

        //    }
        //    catch (Exception Err)
        //    {
        //        logger.Error(Err.Message);
        //        Response.Write(Err.StackTrace);
        //    }
        //}

        protected void sendmail_Click(object sender, EventArgs e)
        {
            string username = ConfigurationManager.AppSettings["username"];
            string host = ConfigurationManager.AppSettings["host"];
            string port = ConfigurationManager.AppSettings["port"];
            string pass = ConfigurationManager.AppSettings["password"];
            string from = ConfigurationManager.AppSettings["fromemail"];
            int noofuserselected = 0;

            foreach (ListItem listItem in chkUser.Items)
            {
                if (listItem.Selected == true)
                {
                    noofuserselected++;
                }
            }



            if (txtSubject.Text == "" || Editor.Text == "" || noofuserselected == 0)
            {
                if (noofuserselected == 0)
                {
                    ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please fill subject/Email or select users!');", true);
                    return;
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please fill subject/Email content!');", true);
                    return;
                }
            }

            try
            {
                NewsLetter objNl = new NewsLetter();
                User objUser = new User();
                UserRepository objUserRepository = new UserRepository();
                NewsLetterRepository objnlRepo = new NewsLetterRepository();
                foreach (ListItem listItem in chkUser.Items)
                {
                    if (listItem.Selected)
                    {


                        objUser = objUserRepository.getUsersById(Guid.Parse(listItem.Value));
                        if (objUser != null)
                        {
                            MailHelper.SendSendGridMail(host, Convert.ToInt32(port), from, "", objUser.EmailId.ToString(), string.Empty, string.Empty, txtSubject.Text, Editor.Text, username, pass);


                            objNl.Id = Guid.NewGuid();
                            objNl.Subject = txtSubject.Text;
                            objNl.NewsLetterBody = Editor.Text;
                            objNl.SendDate = DateTime.Parse(txtSendDate.Text);
                            objNl.SendStatus = false;
                            objNl.UserId = Guid.Parse(listItem.Value);
                            objNl.EntryDate = DateTime.Now;
                            //if (!objnlRepo.checkNewsLetterExists(Editor.Text))
                            //    objnlRepo.AddNewsLetter(objNl);
                            //else
                                //objnlRepo.UpdateNewsLetter(objNl);
                            objnlRepo.AddNewsLetter(objNl);
                        }
                    }
                }
                txtSubject.Text = "";
                Editor.Text = "";
                clearAll();
//.........这里部分代码省略.........
开发者ID:JBNavadiya,项目名称:socioboard,代码行数:101,代码来源:AddNewsLetter.aspx.cs

示例10: paid_Click

        protected void paid_Click(object sender, EventArgs e)
        {
            clearAll();
            try
            {
                NewsLetter objNl = new NewsLetter();
                User objUser = new User();
                UserRepository objUserRepository = new UserRepository();
                NewsLetterRepository objnlRepo = new NewsLetterRepository();
                foreach (ListItem listItem in chkUser.Items)
                {
                    objUser = objUserRepository.getUsersById(Guid.Parse(listItem.Value));
                    if (objUser.PaymentStatus.ToUpper() == "PAID")
                    {
                        listItem.Selected = true;
                    }

                }

            }
            catch (Exception Err)
            {
                logger.Error(Err.Message);
                Response.Write(Err.StackTrace);
            }
        }
开发者ID:JBNavadiya,项目名称:socioboard,代码行数:26,代码来源:AddNewsLetter.aspx.cs

示例11: SetInvitationStatusAfterSuccessfulRegistration

        public int SetInvitationStatusAfterSuccessfulRegistration(string refid,string userEmail)
        {
            int res = 0;
            try
            {

                UserRepository objUserRepository = new UserRepository();

                User user = objUserRepository.getUsersById(Guid.Parse(refid));

                Invitation objInvitation=new Invitation();
                objInvitation.SenderEmail=user.EmailId;
                objInvitation.FriendEmail=userEmail;
                objInvitation.Status = "12";

                InvitationRepository objInvitationRepository = new InvitationRepository();
                res = objInvitationRepository.SetInvitationStatusBySenderEmailFreiendEmail(objInvitation);
            }
            catch (Exception ex)
            {
                logger.Error(ex.StackTrace);

                Console.WriteLine(ex.StackTrace);
                //Response.Redirect("Home.aspx");
            }
            return res;
        }
开发者ID:rathika1,项目名称:socioboard,代码行数:27,代码来源:Registration.aspx.cs


注:本文中的SocioBoard.Model.UserRepository.getUsersById方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。