Beispiel #1
0
        public void DeleteNotifications(DO_SANotification objSANotification, Case flag)
        {
            SqlConnection conn = new SqlConnection();
            SQLManager    co   = new SQLManager();

            conn = co.GetConnection();

            cmd             = new SqlCommand("Scrl_AddSANotification", conn);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@FlagNo", SqlDbType.Int).Value = flag;
            cmd.Parameters.Add("@Notification_ID", SqlDbType.VarChar).Value = objSANotification.intNotificationId;
            cmd.ExecuteNonQuery();
            co.CloseConnection(conn);
        }
Beispiel #2
0
        public DataTable GetDataTable(DO_SANotification objSANotification, Case 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_AddSANotification", conn);
            da.SelectCommand.CommandType = CommandType.StoredProcedure;
            da.SelectCommand.Parameters.Add("@FlagNo", SqlDbType.Int).Value = flag;
            da.SelectCommand.Parameters.Add("@strNotificationDetail", SqlDbType.VarChar).Value = objSANotification.NotificationDetail;
            da.SelectCommand.Parameters.Add("@CurrentPage", SqlDbType.Int).Value = objSANotification.CurrentPage;
            da.SelectCommand.Parameters.Add("@PageSize", SqlDbType.Int).Value    = objSANotification.CurrentPageSize;
            da.Fill(dt);
            co.CloseConnection(conn);
            return(dt);
        }