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


C# DBFunctions.getLirarymember方法代码示例

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


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

示例1: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        bool loggedStatus = false;
        if (System.Web.HttpContext.Current.User != null)
        {
            DatabaseFunctions d = new DatabaseFunctions();
            loggedStatus = System.Web.HttpContext.Current.User.Identity.IsAuthenticated;
            if (loggedStatus)
            {
                UserID = Membership.GetUser().ProviderUserKey.ToString();
                stid = d.GetCandidateID(UserID);
                if (stid != -1)
                {
                    DBFunctions db = new DBFunctions();
                    backlink.Text = "<a href='#0' class='btn btn-primary' onclick='history.back()'>Back</a>";

                    var chk = db.getLirarymember(stid);
                    if (chk == null)
                    {
                        var stdent = db.getstdentinfo(stid);
                        nametxt.Text = stdent.Candidate_tbl.Name;
                        metricno.Text = stdent.Candidate_tbl.AddmissionList_tbl.FirstOrDefault().MetricNo;
                        programme.Text = stdent.Program_tbl.ProgramName;
                    }
                    else
                    {
                        membershipform.Visible = false;
                        membermsg.Visible = true;
                        if (chk.Status == 0)
                        {
                            membermsg.InnerText = "Your Request For Library Membership is Pending..!!";
                        }

                        else if (chk.Status == 1)
                        {
                            membermsg.InnerText = "You Already Have The Library Membership!!";

                        }
                    }
                }
                else
                {

                }
            }
        }
    }
开发者ID:EezeSolutions,项目名称:Higher_Erp,代码行数:47,代码来源:RequestMemberShip.aspx.cs

示例2: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["userid"] != null)
        {
            int stid = int.Parse(Session["userid"].ToString());

            DBFunctions db = new DBFunctions();
            backlink.Text = "<a href='#0' class='btn btn-primary' onclick='history.back()'>Back</a>";

            var chk = db.getLirarymember(stid);
            if (chk == null)
            {
                var stdent = db.getstdentinfo(stid);
                nametxt.Text = stdent.Candidate_tbl.Name;
                metricno.Text = stdent.Candidate_tbl.AddmissionList_tbl.FirstOrDefault().MetricNo;
                programme.Text = stdent.Program_tbl.ProgramName;
            }
            else
            {
                membershipform.Visible = false;
                membermsg.Visible = true;
                if(chk.Status==0){
                    membermsg.InnerText = "Your Request For Library Membership is Pending..!!";
                }

                else if(chk.Status==1)
                {
                    membermsg.InnerText = "You Already Have The Library Membership!!";

                }
            }
        }
        else
        {

        }
    }
开发者ID:EezeSolutions,项目名称:Higher_Erp,代码行数:37,代码来源:RequestMemberShip.aspx.cs

示例3: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        bool loggedStatus = false;
        DBFunctions db = new DBFunctions();
        string pagename = Path.GetFileName(Request.PhysicalPath);

        if (System.Web.HttpContext.Current.User == null)
        {
            Response.Redirect("Login.aspx?Redirecturl=" + pagename);
        }
        else
        {
            loggedStatus = System.Web.HttpContext.Current.User.Identity.IsAuthenticated;
            if (loggedStatus)
            {
                DatabaseFunctions d = new DatabaseFunctions();

                UserID = Membership.GetUser().ProviderUserKey.ToString();
                int stid = d.GetCandidateID(UserID);
                if (stid != -1)
                {
                    var chk = db.getLirarymember(stid);
                    backlink.Text = "<a href='#0' class='btn btn-primary' onclick='history.back()'>Back</a>";

                    if (chk == null)
                    {
                        searchcontrols.Visible = false;
                        pagingdiv.Visible = false;
                        tblbooks.Visible = false;
                        membermsg.Visible = true;
                        linkmemebrship.Visible = true;
                        membermsg.InnerText = "Your Do Not Have The Library Membership..!!";

                        //var stdent = db.getstdentinfo(stid);
                        //nametxt.Text = stdent.Candidate_tbl.Name;
                        //metricno.Text = stdent.Candidate_tbl.AddmissionList_tbl.FirstOrDefault().MetricNo;
                        //programme.Text = stdent.Program_tbl.ProgramName;
                        return;
                    }
                    else if (chk.Status == 0)
                    {
                        tblbooks.Visible = false;
                        searchcontrols.Visible = false;
                        pagingdiv.Visible = false;

                        membermsg.Visible = true;
                        //membershipform.Visible = false;
                        //membermsg.Visible = true;
                        membermsg.InnerText = "Your Request For Library Membership is Pending..!!";
                        return;
                    }

                    int pageStart = 1;
                    int pageEnd = 10;
                    if (Request.QueryString.ToString().Contains("page"))
                    {
                        page = Convert.ToInt32(Request.QueryString["page"].ToString());
                        pageEnd = pageSize * page;
                        pageStart = (pageEnd - pageSize) + 1;
                    }


                    // List<Book> ds = new List<Book>();



                    literalStart.Text = pageStart.ToString();
                    literalEnd.Text = pageEnd.ToString();

                    int tmpPageEnd = 0;
                    tmpPageEnd = pageEnd;

                    pageEnd = db.getBook_Count();



                    if (pageEnd > 10)
                    {
                        literalTotal.Text = pageEnd.ToString();

                        int pagett = 0;
                        pagett = Convert.ToInt16(literalEnd.Text);

                        if (pagett > pageEnd)
                        {
                            literalEnd.Text = pageEnd.ToString();
                        }

                    }
                    else
                    {
                        if (pageEnd == 0)
                        {
                            literalStart.Text = "";
                        }
                        literalTotal.Text = pageEnd.ToString();
                        literalEnd.Text = pageEnd.ToString();
                    }


//.........这里部分代码省略.........
开发者ID:EezeSolutions,项目名称:Higher_Erp,代码行数:101,代码来源:AvailableBooks.aspx.cs


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