コード例 #1
0
ファイル: supportDenyDAL.cs プロジェクト: rajarupinder/RMMP
    public DataTable updateData(supportDenyBO supportdenybo)
    {
        try
        {

            query = "SUPPORT_DENY_CLICK1";
            if (con.State == ConnectionState.Closed)
            {
                con.Open();
            }

            dap = new SqlDataAdapter(query,con);

            dap.SelectCommand.CommandType = CommandType.StoredProcedure;
            dap.SelectCommand.Parameters.AddWithValue("@issueId", supportdenybo.issueId);
            dap.SelectCommand.Parameters.AddWithValue("@guid", supportdenybo.guid);
            dap.SelectCommand.Parameters.AddWithValue("@supportDenyValue", supportdenybo.supportDeny);
            DataTable dt = new DataTable();
            dap.Fill(dt);
            return dt;

        }
        catch
        {
            throw;
        }
        finally
        {
            if (con.State == ConnectionState.Open)
                con.Close();
            dap.Dispose();
        }
    }
コード例 #2
0
ファイル: supportDenyDAL.cs プロジェクト: CoderAjay/rmmp
    public void updateData(supportDenyBO supportdenybo)
    {
        try
        {

            query = "SUPPORT_DENY_CLICK";
            if (con.State == ConnectionState.Closed)
            {
                con.Open();
            }
            cmd = new SqlCommand(query, con);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@issueId", supportdenybo.issueId);
            cmd.Parameters.AddWithValue("@guid",supportdenybo.guid);
            cmd.Parameters.AddWithValue("@supportDenyValue",supportdenybo.supportDeny);
            cmd.ExecuteNonQuery();

        }
        catch
        {
            throw;
        }
        finally
        {
            if (con.State == ConnectionState.Open)
                con.Close();
            cmd.Dispose();
        }
    }
コード例 #3
0
    public DataTable updateData(supportDenyBO supportdenybo)
    {
        try
        {
            query = "SUPPORT_DENY_CLICK1";
            if (con.State == ConnectionState.Closed)
            {
                con.Open();
            }

            dap = new SqlDataAdapter(query, con);

            dap.SelectCommand.CommandType = CommandType.StoredProcedure;
            dap.SelectCommand.Parameters.AddWithValue("@issueId", supportdenybo.issueId);
            dap.SelectCommand.Parameters.AddWithValue("@guid", supportdenybo.guid);
            dap.SelectCommand.Parameters.AddWithValue("@supportDenyValue", supportdenybo.supportDeny);
            DataTable dt = new DataTable();
            dap.Fill(dt);
            return(dt);
        }
        catch
        {
            throw;
        }
        finally
        {
            if (con.State == ConnectionState.Open)
            {
                con.Close();
            }
            dap.Dispose();
        }
    }
コード例 #4
0
    protected void DataListIssues_ItemCommand(object source, DataListCommandEventArgs e)
    {
        supportDenyBO supportdenybo = new supportDenyBO();

        string btncmdname;
        try
        {

            btncmdname = e.CommandName.ToString();
            if (btncmdname == "support")
            {
                supportdenybo.guid = 1; /** from session **/
                supportdenybo.issueId = Convert.ToInt64(e.CommandArgument);
                supportdenybo.supportDeny = true;
                supportdenybal.updateData(supportdenybo);
                loadDataList();
            }
            if (btncmdname == "deny")
            {
                supportdenybo.guid = 1; /** from session **/
                supportdenybo.issueId = Convert.ToInt64(e.CommandArgument);
                supportdenybo.supportDeny = false;
                supportdenybal.updateData(supportdenybo);
                loadDataList();

            }
            if (btncmdname == "post")
            {
                commentsBO commentsbo = new commentsBO();
                TextBox txtcomment = e.Item.FindControl("TxtComment") as TextBox;
                commentsbo.comment = ((TextBox)(e.Item.FindControl("TxtComment"))).Text;
                HiddenField issueIdh = e.Item.FindControl("HiddenFieldissueId") as HiddenField;
                Int64 issueId = Convert.ToInt64(issueIdh.Value);

                commentsbo.issueId = issueId;
                txtcomment.Text = "";
                commentsbo.guid = 1; /** from session **/
                commentbal.postComment(commentsbo);
                loadDataList();

              }
        }
        catch
        {
            throw;
        }
        finally
        {

        }
    }
コード例 #5
0
ファイル: SupportDenyBAL.cs プロジェクト: CoderAjay/rmmp
 public void updateData(supportDenyBO supportdenybo)
 {
     try
     {
         supportdenydal.updateData(supportdenybo);
     }
     catch
     {
         throw;
     }
     finally
     {
     }
 }
コード例 #6
0
 public DataTable updateData(supportDenyBO supportdenybo)
 {
     try
     {
         return(supportdenydal.updateData(supportdenybo));
     }
     catch
     {
         throw;
     }
     finally
     {
     }
 }
コード例 #7
0
ファイル: SupportDenyBAL.cs プロジェクト: rajarupinder/RMMP
 public DataTable updateData(supportDenyBO supportdenybo)
 {
     try
     {
        return supportdenydal.updateData(supportdenybo);
     }
     catch
     {
         throw;
     }
     finally
     {
     }
 }
コード例 #8
0
    private string supportDeny(Int64 issueId, Int64 guId, string val)
    {
        SupportDenyBAL supportdenybal = new SupportDenyBAL();
        supportDenyBO  supportdenybo  = new supportDenyBO();

        supportdenybo.issueId     = issueId;
        supportdenybo.guid        = guId;
        supportdenybo.supportDeny = true;
        if (val != "")
        {
            if (val.ToString() == "support")
            {
                supportdenybo.supportDeny = true;
            }
            else if (val.ToString() == "deny")
            {
                supportdenybo.supportDeny = false;
            }

            DataTable dt = (DataTable)supportdenybal.updateData(supportdenybo);
            return(ConvertToJason(dt));
        }
        return("Error ");
    }
コード例 #9
0
    protected void ListIssues_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        supportDenyBO supportdenybo = new supportDenyBO();
        Int64 issueId ;
        string btncmdname;
        try
        {
            issueId = Convert.ToInt64(e.CommandArgument);
            btncmdname = e.CommandName.ToString();
            if (btncmdname == "comment")
            {
                //    ((Repeater)e.Item.FindControl("ListComments")).DataSource = (DataTable)commentbal.getComments(Convert.ToInt64(issueId));
                //    ((Repeater)e.Item.FindControl("ListComments")).DataBind();
            }
            else if (btncmdname == "support")
            {
                supportdenybo.guid = int.Parse(Session["guid"].ToString()); /** from session **/
                supportdenybo.issueId = issueId;
                supportdenybo.supportDeny = true;
                DataTable dt= supportdenybal.updateData(supportdenybo);
                ((Label)e.Item.FindControl("LBLsupportCount")).Text = dt.Rows[0]["supportCount"].ToString();
                ((Label)e.Item.FindControl("LBLdenyCount")).Text = dt.Rows[0]["denyCount"].ToString();
            }
            else if (btncmdname == "deny")
            {
                supportdenybo.guid = int.Parse(Session["guid"].ToString()); ; /** from session **/
                supportdenybo.issueId = issueId;
                supportdenybo.supportDeny = false;
                DataTable dt = supportdenybal.updateData(supportdenybo);
                ((Label)e.Item.FindControl("LBLsupportCount")).Text = dt.Rows[0]["supportCount"].ToString();
                ((Label)e.Item.FindControl("LBLdenyCount")).Text = dt.Rows[0]["denyCount"].ToString();

            }
            else if (btncmdname == "report")
            {
                reportbal.Issue_Report(issueId);
                ((Image)e.Item.FindControl("IMG_Report")).ImageUrl = "../images/flag-red.png";
                ((LinkButton)e.Item.FindControl("Report_Abuse")).Enabled = false;
            }
            else if (btncmdname == "post")
            {

                commentsBO commentsbo = new commentsBO();
                TextBox txtcomment = (TextBox)(e.Item.FindControl("TxtComment"));
                if (txtcomment.Text != "")
                {
                    commentsbo.comment = txtcomment.Text;
                    commentsbo.issueId = issueId;
                    txtcomment.Text = "";
                    commentsbo.guid = int.Parse(Session["guid"].ToString()); /** from session **/
                    commentbal.postComment(commentsbo);
                    ((Repeater)e.Item.FindControl("ListComments")).DataSource = (DataTable)commentbal.getComments(Convert.ToInt64(issueId));
                    ((Repeater)e.Item.FindControl("ListComments")).DataBind();
                }
            }
            else if (btncmdname == "more")
            {
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
        finally
        {

        }
    }
コード例 #10
0
    protected void ListIssues_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        supportDenyBO supportdenybo = new supportDenyBO();
        Int64 issueId ;
        string btncmdname;
        try
        {
            issueId = Convert.ToInt64(e.CommandArgument);
            btncmdname = e.CommandName.ToString();
            if (btncmdname == "comment")
            {
                //    ((Repeater)e.Item.FindControl("ListComments")).DataSource = (DataTable)commentbal.getComments(Convert.ToInt64(issueId));
                //    ((Repeater)e.Item.FindControl("ListComments")).DataBind();
            }
            else if (btncmdname == "support")
            {
                supportdenybo.guid = int.Parse(Session["guid"].ToString()); /** from session **/
                supportdenybo.issueId = issueId;
                supportdenybo.supportDeny = true;
                supportdenybal.updateData(supportdenybo);
                DataTable dt = issuesbal.getIssue(issueId);
                ((Label)e.Item.FindControl("LBLsupportCount")).Text = dt.Rows[0]["supportCount"].ToString();
                ((Label)e.Item.FindControl("LBLdenyCount")).Text = dt.Rows[0]["denyCount"].ToString();
            }
            else if (btncmdname == "deny")
            {
                supportdenybo.guid = int.Parse(Session["guid"].ToString()); ; /** from session **/
                supportdenybo.issueId = issueId;
                supportdenybo.supportDeny = false;
                supportdenybal.updateData(supportdenybo);
                DataTable dt = issuesbal.getIssue(issueId);
                ((Label)e.Item.FindControl("LBLsupportCount")).Text = dt.Rows[0]["supportCount"].ToString();
                ((Label)e.Item.FindControl("LBLdenyCount")).Text = dt.Rows[0]["denyCount"].ToString();

            }
            else if (btncmdname == "post")
            {
                commentsBO commentsbo = new commentsBO();
                TextBox txtcomment = e.Item.FindControl("TxtComment") as TextBox;
                commentsbo.comment = ((TextBox)(e.Item.FindControl("TxtComment"))).Text;
                commentsbo.issueId = issueId;
                txtcomment.Text = "";
                commentsbo.guid = int.Parse(Session["guid"].ToString()); /** from session **/
                commentbal.postComment(commentsbo);
                ((Repeater)e.Item.FindControl("ListComments")).DataSource = (DataTable)commentbal.getComments(Convert.ToInt64(issueId));
                ((Repeater)e.Item.FindControl("ListComments")).DataBind();
                DataTable dt = issuesbal.getIssue(issueId);
                ((Label)e.Item.FindControl("LBLcommentCount")).Text = dt.Rows[0]["commentCount"].ToString();
                loadlist(50, 0);
            }
        }
        catch
        {
            throw;
        }
        finally
        {

        }
    }
コード例 #11
0
    private string supportDeny(Int64 issueId, Int64 guId, string val)
    {
        SupportDenyBAL supportdenybal = new SupportDenyBAL();
        supportDenyBO supportdenybo = new supportDenyBO();
        supportdenybo.issueId = issueId;
        supportdenybo.guid = guId;
        supportdenybo.supportDeny = true;
        if (val != "")
        {
            if (val.ToString() == "support")
                supportdenybo.supportDeny = true;
            else if (val.ToString() == "deny")
                supportdenybo.supportDeny = false;

            DataTable dt = (DataTable)supportdenybal.updateData(supportdenybo);
            return ConvertToJason(dt);
        }
        return "Error ";
    }
コード例 #12
0
    protected void ListIssues_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        supportDenyBO supportdenybo = new supportDenyBO();
        Int64         issueId;
        string        btncmdname;

        try
        {
            issueId    = Convert.ToInt64(e.CommandArgument);
            btncmdname = e.CommandName.ToString();
            if (btncmdname == "comment")
            {
                //    ((Repeater)e.Item.FindControl("ListComments")).DataSource = (DataTable)commentbal.getComments(Convert.ToInt64(issueId));
                //    ((Repeater)e.Item.FindControl("ListComments")).DataBind();
            }
            else if (btncmdname == "support")
            {
                supportdenybo.guid        = int.Parse(Session["guid"].ToString()); /** from session **/
                supportdenybo.issueId     = issueId;
                supportdenybo.supportDeny = true;
                DataTable dt = supportdenybal.updateData(supportdenybo);
                ((Label)e.Item.FindControl("LBLsupportCount")).Text = dt.Rows[0]["supportCount"].ToString();
                ((Label)e.Item.FindControl("LBLdenyCount")).Text    = dt.Rows[0]["denyCount"].ToString();
            }
            else if (btncmdname == "deny")
            {
                supportdenybo.guid        = int.Parse(Session["guid"].ToString());; /** from session **/
                supportdenybo.issueId     = issueId;
                supportdenybo.supportDeny = false;
                DataTable dt = supportdenybal.updateData(supportdenybo);
                ((Label)e.Item.FindControl("LBLsupportCount")).Text = dt.Rows[0]["supportCount"].ToString();
                ((Label)e.Item.FindControl("LBLdenyCount")).Text    = dt.Rows[0]["denyCount"].ToString();
            }
            else if (btncmdname == "report")
            {
                reportbal.Issue_Report(issueId);
                ((Image)e.Item.FindControl("IMG_Report")).ImageUrl       = "../images/flag-red.png";
                ((LinkButton)e.Item.FindControl("Report_Abuse")).Enabled = false;
            }
            else if (btncmdname == "post")
            {
                commentsBO commentsbo = new commentsBO();
                TextBox    txtcomment = (TextBox)(e.Item.FindControl("TxtComment"));
                if (txtcomment.Text != "")
                {
                    commentsbo.comment = txtcomment.Text;
                    commentsbo.issueId = issueId;
                    txtcomment.Text    = "";
                    commentsbo.guid    = int.Parse(Session["guid"].ToString()); /** from session **/
                    commentbal.postComment(commentsbo);
                    ((Repeater)e.Item.FindControl("ListComments")).DataSource = (DataTable)commentbal.getComments(Convert.ToInt64(issueId));
                    ((Repeater)e.Item.FindControl("ListComments")).DataBind();
                }
            }
            else if (btncmdname == "more")
            {
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
        finally
        {
        }
    }