Beispiel #1
0
    public ReturnBool delete_subject(olu_ba_layer ur)
    {
        MySqlParameter[] pm11 = new MySqlParameter[] {
            new MySqlParameter("Subject_id", ur.Subject_id)
        };

        query = @"delete from  subjects  where Subject_id=@Subject_id";
        rb    = db.executeInsertQuery(query, pm11);
        return(rb);
    }
Beispiel #2
0
 public ReturnClass.ReturnDataTable INTSUB_video_id(olu_ba_layer co)
 {
     query = "SELECT IFNULL(MAX(CAST(SUBSTRING(video_id,7,4) as UNSIGNED INTEGER)),0) as pid  from video_topic_wise   WHERE year(date_time) = @c_year AND month(date_time)=@c_month ";
     MySqlParameter[] pr = new MySqlParameter[] {
         new MySqlParameter("c_year", co.C_year),
         new MySqlParameter("c_month", co.C_month),
     };
     dt = db.executeSelectQuery(query, pr);
     return(dt);
 }
Beispiel #3
0
    public ReturnBool delete_class(olu_ba_layer ur)
    {
        MySqlParameter[] pm11 = new MySqlParameter[] {
            new MySqlParameter("Class_id", ur.Class_id)
        };

        query = @"delete from  classes  where Class_id=@Class_id";
        rb    = db.executeInsertQuery(query, pm11);
        return(rb);
    }
Beispiel #4
0
 public ReturnDataTable get_class_code(olu_ba_layer ur)
 {
     MySqlParameter[] pm = new MySqlParameter[]
     {
         new MySqlParameter("Class_Name", ur.Class_id)
     };
     query = @"select * from classes where Class_Name=@Class_Name ";
     dt    = db.executeSelectQuery(query, pm);
     return(dt);
 }
Beispiel #5
0
    public ReturnBool delete_Video(olu_ba_layer ur)
    {
        MySqlParameter[] pm11 = new MySqlParameter[] {
            new MySqlParameter("video_id", ur.Video_id)
        };

        query = @"delete from  video_topic_wise  where video_id=@video_id";
        rb    = db.executeInsertQuery(query, pm11);
        return(rb);
    }
Beispiel #6
0
    public ReturnBool delete_topic(olu_ba_layer ur)
    {
        MySqlParameter[] pm11 = new MySqlParameter[] {
            new MySqlParameter("Topic_id", ur.Topic_id)
        };

        query = @"delete from  topics_wise_subject  where Topic_id=@Topic_id";
        rb    = db.executeInsertQuery(query, pm11);
        return(rb);
    }
Beispiel #7
0
    public ReturnBool update_class(olu_ba_layer ur)
    {
        MySqlParameter[] pm11 = new MySqlParameter[] {
            new MySqlParameter("Class_Name", ur.Category),
            new MySqlParameter("Class_id", ur.Class_id)
        };

        query = @"update classes set Class_Name=@Class_Name where Class_id=@Class_id";
        rb    = db.executeInsertQuery(query, pm11);
        return(rb);
    }
Beispiel #8
0
 public ReturnDataTable get_subject_id(olu_ba_layer ur)
 {
     MySqlParameter[] pm = new MySqlParameter[]
     {
         new MySqlParameter("Name", ur.Desc + "%"),
         new MySqlParameter("class_id", ur.Class_code)
     };
     query = @"select * from subjects s where s.class_id=@class_id and subject_name like @Name ";
     dt    = db.executeSelectQuery(query, pm);
     return(dt);
 }
Beispiel #9
0
    public ReturnBool update_subject(olu_ba_layer ur)
    {
        MySqlParameter[] pm11 = new MySqlParameter[] {
            new MySqlParameter("Subject_Name", ur.Category),
            new MySqlParameter("Subject_id", ur.Subject_id),
            new MySqlParameter("class_id", ur.Class_id)
        };

        query = @"update subjects set Subject_Name=@Subject_Name,class_id=@class_id where Subject_id=@Subject_id";
        rb    = db.executeInsertQuery(query, pm11);
        return(rb);
    }
Beispiel #10
0
    public ReturnDataTable get_class_videos(olu_ba_layer ur)
    {
        MySqlParameter[] pm = new MySqlParameter[]
        {
            new MySqlParameter("Subject_id", ur.Symptom_id)
        };
        query = @"select * from topics_wise_subject t
join video_topic_wise v on v.Topic_id=t.Topic_id
where t.Subject_id=@Subject_id";
        dt    = db.executeSelectQuery(query, pm);
        return(dt);
    }
Beispiel #11
0
    public ReturnBool update_topic(olu_ba_layer ur)
    {
        MySqlParameter[] pm11 = new MySqlParameter[] {
            new MySqlParameter("Topic_Name", ur.Headline),
            new MySqlParameter("Subject_id", ur.Subject_id),
            new MySqlParameter("Topic_Description", ur.Description),
            new MySqlParameter("Topic_id", ur.Topic_id)
        };

        query = @"update topics_wise_subject set Topic_Name=@Topic_Name,Topic_Description=@Topic_Description,Subject_id=@Subject_id where Topic_id=@Topic_id";
        rb    = db.executeInsertQuery(query, pm11);
        return(rb);
    }
Beispiel #12
0
    public void bind_class_id()
    {
        olu_ba_layer     bl = new olu_ba_layer();
        olu_da_layer_new dl = new olu_da_layer_new();

        if (Session["User_Id"] != null)
        {
            bl.User_id = Session["User_Id"].ToString();
        }
        else
        {
            if (Request.Cookies["User_Id"] != null)
            {
                Session["User_Id"] = Request.Cookies["User_Id"].Value;
                bl.User_id         = Request.Cookies["User_Id"].Value;
            }
        }
        if (Session["class"] != null)
        {
            bl.Class_id = Session["class"].ToString();
        }
        else
        {
            if (Request.Cookies["class"] != null)
            {
                Session["class"] = Request.Cookies["class"].Value;
                bl.Class_id      = Request.Cookies["class"].Value;
            }
        }
        if (Session["stream"] != null)
        {
            bl.Stream_id = Session["stream"].ToString();
        }
        else
        {
            if (Request.Cookies["stream"] != null)
            {
                Session["stream"] = Request.Cookies["stream"].Value;
                bl.Stream_id      = Request.Cookies["stream"].Value;
            }
        }

        dt = dl.get_class_code(bl);
        if (dt.table.Rows.Count > 0)
        {
            Session["Class_id"] = dt.table.Rows[0]["Class_id"].ToString();
            Response.Cookies["Class_id"].Value   = Session["Class_id"].ToString();
            Response.Cookies["Class_id"].Expires = DateTime.Now.AddDays(365);
        }
    }
Beispiel #13
0
    public ReturnBool Insert_class(olu_ba_layer ur)
    {
        MySqlParameter[] pm11 = new MySqlParameter[] {
            new MySqlParameter("Class_id", ur.Class_id),
            new MySqlParameter("Class_Name", ur.Category),
            new MySqlParameter("client_ip", ur.Client_id),
            new MySqlParameter("user_id", ur.User_id),
            new MySqlParameter("date_time", ur.Date_time)
        };

        query = @"INSERT INTO classes(Class_id,Class_Name,client_ip,user_id,date_time)
               VALUES(@Class_id,@Class_Name,@client_ip,@user_id,@date_time)";
        rb    = db.executeInsertQuery(query, pm11);
        return(rb);
    }
Beispiel #14
0
    public ReturnBool Insert_topic(olu_ba_layer ur)
    {
        MySqlParameter[] pm11 = new MySqlParameter[] {
            new MySqlParameter("Topic_id", ur.Topic_id),
            new MySqlParameter("Subject_id", ur.Subject_id),
            new MySqlParameter("Topic_Name", ur.Headline),
            new MySqlParameter("Topic_Description", ur.Description),
            new MySqlParameter("client_ip", ur.Client_id),
            new MySqlParameter("user_id", ur.User_id),
            new MySqlParameter("date_time", ur.Date_time)
        };

        query = @"INSERT INTO topics_wise_subject(Topic_id,Subject_id,Topic_Name,Topic_Description,client_ip,user_id,date_time)
               VALUES(@Topic_id,@Subject_id,@Topic_Name,@Topic_Description,@client_ip,@user_id,@date_time)";
        rb    = db.executeInsertQuery(query, pm11);
        return(rb);
    }
Beispiel #15
0
    public ReturnBool update_Video(olu_ba_layer ur)
    {
        MySqlParameter[] pm11 = new MySqlParameter[] {
            new MySqlParameter("video_id", ur.Video_id),
            new MySqlParameter("Topic_id", ur.Topic_id),
            new MySqlParameter("video_heading", ur.Headline),
            new MySqlParameter("video_description", ur.Description),
            new MySqlParameter("video_url", ur.User_type),
            new MySqlParameter("contentType", ur.Mime_type),
            new MySqlParameter("path", ur.Panjiyan_category_id),
            new MySqlParameter("extension", ur.File_extn)
        };

        query = @"update video_topic_wise set Topic_id=@Topic_id,video_heading=@video_heading,video_description=@video_description,video_url=@video_url,contentType=@contentType,path=@path,extension=@extension where video_id=@video_id";
        rb    = db.executeInsertQuery(query, pm11);
        return(rb);
    }
Beispiel #16
0
    public void GetFileUpload()
    {
        olu_ba_layer bl = new olu_ba_layer();
        olu_da_layer dl = new olu_da_layer();

        ReturnClass.ReturnDataTable dt = new ReturnClass.ReturnDataTable();
        try
        {
            if (Session["User_Id"] != null)
            {
                bl.User_id = Session["User_Id"].ToString();
            }
            else
            {
                if (Request.Cookies["User_Id"] != null)
                {
                    Session["User_Id"] = Request.Cookies["User_Id"].Value;
                    bl.User_id         = Request.Cookies["User_Id"].Value;
                }
            }
            //bl.Panjiyan_category_id = "pic";
            //dt = dl.Getfileupload(bl);
            //if (dt.table.Rows.Count > 0)
            //{

            //    Image1.Visible = true;
            //    byte[] bytes = (byte[])(dt.table.Rows[0][5]);
            //    string base64String = Convert.ToBase64String(bytes, 0, bytes.Length);
            //    Image1.ImageUrl = "data:image/jpg;base64," + base64String;
            //}
            //else
            //{
            bl.Panjiyan_category_id = "pic";
            dt             = dl.Getfileuploadforprofilepic(bl);
            Image1.Visible = true;
            byte[] bytes        = (byte[])(dt.table.Rows[0][5]);
            string base64String = Convert.ToBase64String(bytes, 0, bytes.Length);
            Image1.ImageUrl = "data:image/jpg;base64," + base64String;
            //   }
        }
        catch (NullReferenceException)
        {
            //         Utilities.MessageBox_UpdatePanel_Redirect(UpdatePanel2, "Your Session Has Expired Please Login Again", "../Logout.aspx");
        }
    }
Beispiel #17
0
    public ReturnBool Insert_Video(olu_ba_layer ur)
    {
        MySqlParameter[] pm11 = new MySqlParameter[] {
            new MySqlParameter("video_id", ur.Video_id),
            new MySqlParameter("Topic_id", ur.Topic_id),
            new MySqlParameter("video_heading", ur.Headline),
            new MySqlParameter("video_description", ur.Description),
            new MySqlParameter("video_url", ur.User_type),
            new MySqlParameter("contentType", ur.Mime_type),
            new MySqlParameter("path", ur.Panjiyan_category_id),
            new MySqlParameter("extension", ur.File_extn),
            new MySqlParameter("client_ip", ur.Client_id),
            new MySqlParameter("user_id", ur.User_id),
            new MySqlParameter("date_time", ur.Date_time)
        };

        query = @"INSERT INTO video_topic_wise(video_id,Topic_id,video_heading,video_description,video_url,contentType,path,extension,client_ip,user_id,date_time)
               VALUES(@video_id,@Topic_id,@video_heading,@video_description,@video_url,@contentType,@path,@extension,@client_ip,@user_id,@date_time)";
        rb    = db.executeInsertQuery(query, pm11);
        return(rb);
    }
Beispiel #18
0
    public void testimonial()
    {
        olu_ba_layer bl = new olu_ba_layer();
        olu_da_layer dl = new olu_da_layer();

        ReturnClass.ReturnDataTable dt  = new ReturnClass.ReturnDataTable();
        ReturnClass.ReturnDataTable dtt = new ReturnClass.ReturnDataTable();
        ReturnClass.ReturnBool      rb  = new ReturnClass.ReturnBool();
        dt = dl.bind_testimonial();
        StringBuilder htmlTable = new StringBuilder();
        string        file_id   = null;

        if (dt.table.Rows.Count > 0)
        {
            foreach (DataRow row in dt.table.Rows)
            {
                bl.User_id = row["user_id"].ToString();
                dtt        = dl.bind_testimonial_file_id(bl);
                if (dtt.table.Rows.Count > 0)
                {
                    file_id = dtt.table.Rows[0]["file_id"].ToString();
                }
                else
                {
                    file_id = "7";
                }
                htmlTable.AppendLine("<div class=\"grid-item photography branding\">");
                htmlTable.AppendLine("<div class=\"item\">");
                htmlTable.AppendLine("<div class=\"testimonial theme-bg bottom_pos\">");
                htmlTable.AppendLine("<div class=\"testimonial-avatar\">");
                htmlTable.AppendLine("<img src=\"online_user/Handler.ashx?id=" + file_id + "\" width=\"100\" height=\"104px\"  /> </div>");
                htmlTable.AppendLine("<div class=\"testimonial-info\">" + row["testimonial"] + "</div>");
                htmlTable.AppendLine("<div class=\"author-info\"><strong>" + row["name"] + " <br><span>Cell Salts User</span></strong> </div>");
                htmlTable.AppendLine("</div></div></div>");
                //     Literal1.Text = htmlTable.ToString();
            }
        }
    }
    public void Getnewmessage_new()
    {
        olu_ba_layer bl = new olu_ba_layer();
        olu_da_layer dl = new olu_da_layer();

        ReturnClass.ReturnDataTable dt = new ReturnClass.ReturnDataTable();
        try
        {
            if (Session["User_Id"] != null)
            {
                bl.User_id = Session["User_Id"].ToString();
            }
            else
            {
                if (Request.Cookies["User_Id"] != null)
                {
                    Session["User_Id"] = Request.Cookies["User_Id"].Value;
                    bl.User_id         = Request.Cookies["User_Id"].Value;
                }
            }

            dt = dl.newmessage_update_new(bl);
            if (dt.table.Rows.Count > 0 && dt.table.Rows[0]["newmessage"].ToString() != "0")
            {
                //  lbl_new_message.Text = dt.table.Rows[0]["newmessage"].ToString();
                //    newbadge.Visible = true;
            }
            else
            {
                // newbadge.Visible = false;
            }
        }
        catch (NullReferenceException)
        {
            //         Utilities.MessageBox_UpdatePanel_Redirect(UpdatePanel2, "Your Session Has Expired Please Login Again", "../Logout.aspx");
        }
    }
Beispiel #20
0
    public void Review()
    {
        olu_ba_layer bl = new olu_ba_layer();
        olu_da_layer dl = new olu_da_layer();

        ReturnClass.ReturnDataTable dt  = new ReturnClass.ReturnDataTable();
        ReturnClass.ReturnDataTable dtt = new ReturnClass.ReturnDataTable();
        ReturnClass.ReturnBool      rb  = new ReturnClass.ReturnBool();
        dt = dl.select_user_rating();
        StringBuilder htmlTable = new StringBuilder();
        string        file_id   = null;

        if (dt.table.Rows.Count > 0)
        {
            foreach (DataRow row in dt.table.Rows)
            {
                bl.User_idd = row["user_id"].ToString();
                if (row["user_type"].ToString() == "USER")
                {
                    dtt = dl.bind_review_user_file_id(bl);
                    if (dtt.table.Rows.Count > 0)
                    {
                        file_id = dtt.table.Rows[0]["file_id"].ToString();
                    }
                    else
                    {
                        file_id = "8";
                    }
                }
                else
                {
                    bl.User_idd = row["user_id"].ToString();
                    dtt         = dl.bind_testimonial_file_id(bl);
                    if (dtt.table.Rows.Count > 0)
                    {
                        file_id = dtt.table.Rows[0]["file_id"].ToString();
                    }
                    else
                    {
                        file_id = "7";
                    }
                }
                htmlTable.AppendLine(" <div class=\"product left clearfix mb-40\">");
                htmlTable.AppendLine("<div class=\"product-image\">");
                if (row["user_type"].ToString() == "USER")
                {
                    htmlTable.AppendLine("<img class=\"img-responsive llol\" alt=\"\" src=\"Handler_user.ashx?id=" + file_id + "\" width=\"35px\" height=\"35px\" /></div>");
                }
                else
                {
                    htmlTable.AppendLine("<img class=\"img-responsive llol\" alt=\"\" src=\"Handler.ashx?id=" + file_id + "\" width=\"35px\" height=\"35px\" /></div>");
                }
                htmlTable.AppendLine("<div class=\"product-description\">");
                htmlTable.AppendLine(" <div class=\"product-title\">");
                int lol = Convert.ToInt32(row["AverageRating"]);
                if (lol == 1)
                {
                    htmlTable.AppendLine("<i class=\"fa fa-star\"></i><i class=\"fa fa-star-o\"></i><i class=\"fa fa-star-o\"></i><i class=\"fa fa-star-o\"></i><i class=\"fa fa-star-o\"></i>");
                }
                else if (lol == 2)
                {
                    htmlTable.AppendLine("<i class=\"fa fa-star\"></i><i class=\"fa fa-star\"></i><i class=\"fa fa-star-o\"></i><i class=\"fa fa-star-o\"></i><i class=\"fa fa-star-o\"></i>");
                }
                else if (lol == 3)
                {
                    htmlTable.AppendLine("<i class=\"fa fa-star\"></i><i class=\"fa fa-star\"></i><i class=\"fa fa-star\"></i><i class=\"fa fa-star-o\"></i><i class=\"fa fa-star-o\"></i>");
                }
                else if (lol == 4)
                {
                    htmlTable.AppendLine("<i class=\"fa fa-star\"></i><i class=\"fa fa-star\"></i><i class=\"fa fa-star\"></i><i class=\"fa fa-star\"></i><i class=\"fa fa-star-o\"></i>");
                }
                else if (lol == 5)
                {
                    htmlTable.AppendLine("<i class=\"fa fa-star\"></i><i class=\"fa fa-star\"></i><i class=\"fa fa-star\"></i><i class=\"fa fa-star\"></i><i class=\"fa fa-star\"></i>");
                }
                htmlTable.AppendLine("</div>");
                //     htmlTable.AppendLine("<h5>" + row["name"] + " </h5></div>");
                htmlTable.AppendLine("<div class=\"product-price\">");
                htmlTable.AppendLine("<b>" + row["headline"] + " - </b><ins>" + row["review"] + "</ins></div>");
                htmlTable.AppendLine("<div class=\"product-rate\">");
                htmlTable.AppendLine("<h5>" + row["name"] + " </h5></div>");
                //int lol =Convert.ToInt32(row["AverageRating"]);
                //if (lol == 1)
                //    {
                //    htmlTable.AppendLine("<i class=\"fa fa-star\"></i><i class=\"fa fa-star-o\"></i><i class=\"fa fa-star-o\"></i><i class=\"fa fa-star-o\"></i><i class=\"fa fa-star-o\"></i>");
                //}
                //else if (lol == 2)
                //{
                //    htmlTable.AppendLine("<i class=\"fa fa-star\"></i><i class=\"fa fa-star\"></i><i class=\"fa fa-star-o\"></i><i class=\"fa fa-star-o\"></i><i class=\"fa fa-star-o\"></i>");
                //}
                //else if (lol == 3)
                //{
                //    htmlTable.AppendLine("<i class=\"fa fa-star\"></i><i class=\"fa fa-star\"></i><i class=\"fa fa-star\"></i><i class=\"fa fa-star-o\"></i><i class=\"fa fa-star-o\"></i>");
                //}
                //else if (lol == 4)
                //{
                //    htmlTable.AppendLine("<i class=\"fa fa-star\"></i><i class=\"fa fa-star\"></i><i class=\"fa fa-star\"></i><i class=\"fa fa-star\"></i><i class=\"fa fa-star-o\"></i>");
                //}
                //else if (lol == 5)
                //{
                //    htmlTable.AppendLine("<i class=\"fa fa-star\"></i><i class=\"fa fa-star\"></i><i class=\"fa fa-star\"></i><i class=\"fa fa-star\"></i><i class=\"fa fa-star\"></i>");
                //}
                //    htmlTable.AppendLine("</div></div></div>");
                htmlTable.AppendLine("</div></div>");
                Literal2.Text = htmlTable.ToString();
            }
        }
    }
    public void Getnewmessage()
    {
        olu_ba_layer bl = new olu_ba_layer();
        olu_da_layer dl = new olu_da_layer();

        ReturnClass.ReturnDataTable dt = new ReturnClass.ReturnDataTable();
        try
        {
            if (Session["User_Id"] != null)
            {
                bl.User_id = Session["User_Id"].ToString();
            }
            else
            {
                if (Request.Cookies["User_Id"] != null)
                {
                    Session["User_Id"] = Request.Cookies["User_Id"].Value;
                    bl.User_id         = Request.Cookies["User_Id"].Value;
                }
            }
            if (Session["login_time_new"] != null)
            {
                bl.Logintimeformessage = Session["login_time_new"].ToString();
            }
            else
            {
                if (Request.Cookies["login_time_new"] != null)
                {
                    Session["login_time_new"] = Request.Cookies["login_time_new"].Value;
                    bl.Logintimeformessage    = Request.Cookies["login_time_new"].Value;
                }
                else
                {
                }
            }

            dt = dl.newmessage_update(bl);
            if (dt.table.Rows.Count > 0)
            {
                // lbl_new_message.Text = dt.table.Rows.Count.ToString();
                Session["userlbl_new_message"] = dt.table.Rows.Count.ToString();
                Response.Cookies["userlbl_new_message"].Value   = dt.table.Rows.Count.ToString();
                Response.Cookies["userlbl_new_message"].Expires = DateTime.Now.AddDays(365);
                //  newbadge.Visible = true;
            }
            else
            {
                if (Session["userlbl_new_message"] == null)
                {
                    //    newbadge.Visible = false;
                }
                else
                {
                    int i = Convert.ToInt32(Session["userlbl_new_message"].ToString());
                    int f = i;
                    Session["userlbl_new_message"] = f.ToString();
                    Response.Cookies["userlbl_new_message"].Value   = f.ToString();
                    Response.Cookies["userlbl_new_message"].Expires = DateTime.Now.AddDays(365);
                    if (f > 0)
                    {
                        // lbl_new_message.Text = f.ToString();
                    }
                    else
                    {
                        //   newbadge.Visible = false;
                    }
                }
            }
        }
        catch (NullReferenceException)
        {
            //         Utilities.MessageBox_UpdatePanel_Redirect(UpdatePanel2, "Your Session Has Expired Please Login Again", "../Logout.aspx");
        }
    }