コード例 #1
0
        public void AddEditDel_Case(DO_Case objcase, DA_CaseComment.CaseComment flag)
        {
            SqlConnection conn = new SqlConnection();
            SQLManager    co   = new SQLManager();

            conn = co.GetConnection();

            cmd             = new SqlCommand("Scrl_AddEditDelCaseComment", conn);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@FlagNo", SqlDbType.Int).Value                 = flag;
            cmd.Parameters.Add("@CaseId", SqlDbType.BigInt).Value              = objcase.CaseId;
            cmd.Parameters.Add("@Description", SqlDbType.Text).Value           = objcase.Description;
            cmd.Parameters.Add("@strCaseTitle", SqlDbType.VarChar, 1000).Value = objcase.CaseTitle;
            cmd.Parameters.Add("@strFilePath", SqlDbType.VarChar, 100).Value   = objcase.strFilePath;
            cmd.ExecuteNonQuery();
            co.CloseConnection(conn);
        }
コード例 #2
0
        public DataTable GetDataTable(DO_Case objcase, DA_CaseComment.CaseComment flag)
        {
            DataTable     dt   = new DataTable();
            SqlConnection conn = new SqlConnection();
            SQLManager    co   = new SQLManager();

            conn = co.GetConnection();
            SqlDataAdapter da = new SqlDataAdapter();

            da.SelectCommand             = new SqlCommand("Scrl_AddEditDelCaseComment", conn);
            da.SelectCommand.CommandType = CommandType.StoredProcedure;
            da.SelectCommand.Parameters.Add("@FlagNo", SqlDbType.Int).Value           = flag;
            da.SelectCommand.Parameters.Add("@CaseId", SqlDbType.BigInt).Value        = objcase.CaseId;
            da.SelectCommand.Parameters.Add("@ContentTypeId", SqlDbType.BigInt).Value = objcase.ContentTypeID;
            da.SelectCommand.Parameters.Add("@CommentID", SqlDbType.Int).Value        = objcase.CommnetId;
            da.SelectCommand.Parameters.Add("@intAddedBy", SqlDbType.Int).Value       = objcase.AddedBy;
            da.SelectCommand.Parameters.Add("@TagId", SqlDbType.Int).Value            = objcase.TagId;
            da.SelectCommand.Parameters.Add("@CommnetAddedFor", SqlDbType.Int).Value  = objcase.CommnetAddedFor;

            da.Fill(dt);
            co.CloseConnection(conn);
            return(dt);
        }